Changeset 5bf82ee in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-03-23T16:04:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05ead5c
- Parents:
- c61338a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/transfer_list.c
rc61338a r5bf82ee 91 91 * The batch is added to the end of the list and queue. 92 92 */ 93 void transfer_list_add_batch(transfer_list_t *instance, usb_transfer_batch_t *batch) 93 void transfer_list_add_batch( 94 transfer_list_t *instance, usb_transfer_batch_t *batch) 94 95 { 95 96 assert(instance); … … 146 147 while (current != &instance->batch_list) { 147 148 link_t *next = current->next; 148 usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link); 149 usb_transfer_batch_t *batch = 150 list_get_instance(current, usb_transfer_batch_t, link); 149 151 150 152 if (batch_is_complete(batch)) { … … 160 162 link_t *item = done.next; 161 163 list_remove(item); 162 usb_transfer_batch_t *batch = list_get_instance(item, usb_transfer_batch_t, link); 164 usb_transfer_batch_t *batch = 165 list_get_instance(item, usb_transfer_batch_t, link); 163 166 batch->next_step(batch); 164 167 } … … 174 177 while (!list_empty(&instance->batch_list)) { 175 178 link_t *current = instance->batch_list.next; 176 usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link); 179 usb_transfer_batch_t *batch = 180 list_get_instance(current, usb_transfer_batch_t, link); 177 181 transfer_list_remove_batch(instance, batch); 178 182 usb_transfer_batch_finish(batch, EIO); … … 189 193 * Does not lock the transfer list, caller is responsible for that. 190 194 */ 191 void transfer_list_remove_batch(transfer_list_t *instance, usb_transfer_batch_t *batch) 195 void transfer_list_remove_batch( 196 transfer_list_t *instance, usb_transfer_batch_t *batch) 192 197 { 193 198 assert(instance); … … 210 215 } else { 211 216 usb_transfer_batch_t *prev = 212 list_get_instance(batch->link.prev, usb_transfer_batch_t, link); 217 list_get_instance( 218 batch->link.prev, usb_transfer_batch_t, link); 213 219 assert((batch_qh(prev)->next & LINK_POINTER_ADDRESS_MASK) 214 220 == addr_to_phys(batch_qh(batch)));
Note:
See TracChangeset
for help on using the changeset viewer.