Changeset 28eee11c in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-03-21T15:12:04Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5287502
- Parents:
- 5971dd3 (diff), 7102aa5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/transfer_list.c
r5971dd3 r28eee11c 38 38 39 39 static void transfer_list_remove_batch( 40 transfer_list_t *instance, batch_t *batch);40 transfer_list_t *instance, usb_transfer_batch_t *batch); 41 41 /*----------------------------------------------------------------------------*/ 42 42 /** Initialize transfer list structures. … … 92 92 * The batch is added to the end of the list and queue. 93 93 */ 94 void transfer_list_add_batch(transfer_list_t *instance, batch_t *batch)94 void transfer_list_add_batch(transfer_list_t *instance, usb_transfer_batch_t *batch) 95 95 { 96 96 assert(instance); … … 115 115 } else { 116 116 /* There is something scheduled */ 117 batch_t *last = list_get_instance(118 instance->batch_list.prev, batch_t, link);117 usb_transfer_batch_t *last = list_get_instance( 118 instance->batch_list.prev, usb_transfer_batch_t, link); 119 119 qh_set_next_qh(batch_qh(last), pa); 120 120 } … … 122 122 list_append(&batch->link, &instance->batch_list); 123 123 124 batch_t *first = list_get_instance(125 instance->batch_list.next, batch_t, link);124 usb_transfer_batch_t *first = list_get_instance( 125 instance->batch_list.next, usb_transfer_batch_t, link); 126 126 usb_log_debug("Batch(%p) added to queue %s, first is %p.\n", 127 127 batch, instance->name, first); … … 148 148 while (current != &instance->batch_list) { 149 149 link_t *next = current->next; 150 batch_t *batch = list_get_instance(current,batch_t, link);150 usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link); 151 151 152 152 if (batch_is_complete(batch)) { … … 162 162 link_t *item = done.next; 163 163 list_remove(item); 164 batch_t *batch = list_get_instance(item,batch_t, link);164 usb_transfer_batch_t *batch = list_get_instance(item, usb_transfer_batch_t, link); 165 165 batch->next_step(batch); 166 166 } … … 176 176 while (list_empty(&instance->batch_list)) { 177 177 link_t *current = instance->batch_list.next; 178 batch_t *batch = list_get_instance(current,batch_t, link);178 usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link); 179 179 transfer_list_remove_batch(instance, batch); 180 batch_finish(batch, EIO);180 usb_transfer_batch_finish(batch, EIO); 181 181 } 182 182 fibril_mutex_unlock(&instance->guard); … … 191 191 * Does not lock the transfer list, caller is responsible for that. 192 192 */ 193 void transfer_list_remove_batch(transfer_list_t *instance, batch_t *batch)193 void transfer_list_remove_batch(transfer_list_t *instance, usb_transfer_batch_t *batch) 194 194 { 195 195 assert(instance); … … 207 207 pos = "FIRST"; 208 208 } else { 209 batch_t *prev =210 list_get_instance(batch->link.prev, batch_t, link);209 usb_transfer_batch_t *prev = 210 list_get_instance(batch->link.prev, usb_transfer_batch_t, link); 211 211 qh_set_next_qh(batch_qh(prev), batch_qh(batch)->next); 212 212 pos = "NOT FIRST";
Note:
See TracChangeset
for help on using the changeset viewer.