Changeset 74b852b in mainline
- Timestamp:
- 2017-10-21T19:33:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fd9c30
- Parents:
- f45c78f
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
rf45c78f r74b852b 67 67 68 68 list_initialize(&hc->commands); 69 70 fibril_mutex_initialize(&hc->commands_mtx); 71 69 72 return EOK; 70 73 } … … 126 129 static inline xhci_cmd_t *get_command(xhci_hc_t *hc, uint64_t phys) 127 130 { 131 fibril_mutex_lock(&hc->commands_mtx); 132 128 133 link_t *cmd_link = list_first(&hc->commands); 129 134 … … 139 144 if (cmd_link != NULL) { 140 145 list_remove(cmd_link); 146 fibril_mutex_unlock(&hc->commands_mtx); 141 147 142 148 return list_get_instance(cmd_link, xhci_cmd_t, link); 143 149 } 144 150 151 fibril_mutex_unlock(&hc->commands_mtx); 145 152 return NULL; 146 153 } … … 151 158 assert(cmd); 152 159 160 fibril_mutex_lock(&hc->commands_mtx); 153 161 list_append(&cmd->link, &hc->commands); 162 fibril_mutex_unlock(&hc->commands_mtx); 154 163 155 164 xhci_trb_ring_enqueue(&hc->command_ring, &cmd->trb, &cmd->trb_phys); -
uspace/drv/bus/usb/xhci/hc.h
rf45c78f r74b852b 37 37 #define XHCI_HC_H 38 38 39 #include <fibril_synch.h> 39 40 #include <usb/host/usb_transfer_batch.h> 40 41 #include "hw_struct/regs.h" … … 82 83 /* Command list */ 83 84 list_t commands; 85 fibril_mutex_t commands_mtx; 86 84 87 list_t transfers; 85 88
Note:
See TracChangeset
for help on using the changeset viewer.