Changeset cac458f in mainline for uspace/drv/bus/usb/uhci/transfer_list.c
- Timestamp:
- 2011-06-22T01:59:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 41e2118
- Parents:
- 79506d6 (diff), f1fae414 (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 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/transfer_list.c
r79506d6 rcac458f 121 121 } else { 122 122 /* There is something scheduled */ 123 usb_transfer_batch_t *last = 124 usb_transfer_batch_from_link(instance->batch_list.prev);123 usb_transfer_batch_t *last = usb_transfer_batch_from_link( 124 list_last(&instance->batch_list)); 125 125 last_qh = batch_qh(last); 126 126 } … … 141 141 list_append(&batch->link, &instance->batch_list); 142 142 143 usb_transfer_batch_t *first = list_get_instance( 144 instance->batch_list.next, usb_transfer_batch_t, link); 145 usb_log_debug("Batch(%p) added to queue %s, first is %p.\n", 146 batch, instance->name, first); 143 usb_log_debug("Batch %p " USB_TRANSFER_BATCH_FMT " scheduled in queue %s.\n", 144 batch, USB_TRANSFER_BATCH_ARGS(*batch), instance->name); 147 145 fibril_mutex_unlock(&instance->guard); 148 146 } 149 147 /*----------------------------------------------------------------------------*/ 150 /** Add completed ba ntches to the provided list.148 /** Add completed batches to the provided list. 151 149 * 152 150 * @param[in] instance List to use. 153 151 * @param[in] done list to fill 154 152 */ 155 void transfer_list_remove_finished(transfer_list_t *instance, li nk_t *done)153 void transfer_list_remove_finished(transfer_list_t *instance, list_t *done) 156 154 { 157 155 assert(instance); … … 159 157 160 158 fibril_mutex_lock(&instance->guard); 161 link_t *current = instance->batch_list. next;162 while (current != &instance->batch_list ) {159 link_t *current = instance->batch_list.head.next; 160 while (current != &instance->batch_list.head) { 163 161 link_t * const next = current->next; 164 162 usb_transfer_batch_t *batch = … … 183 181 fibril_mutex_lock(&instance->guard); 184 182 while (!list_empty(&instance->batch_list)) { 185 link_t * const current = instance->batch_list.next;183 link_t * const current = list_first(&instance->batch_list); 186 184 usb_transfer_batch_t *batch = 187 185 usb_transfer_batch_from_link(current); … … 214 212 qh_t *prev_qh = NULL; 215 213 /* Remove from the hardware queue */ 216 if ( instance->batch_list.next== &batch->link) {214 if (list_first(&instance->batch_list) == &batch->link) { 217 215 /* I'm the first one here */ 218 216 prev_qh = instance->queue_head; … … 234 232 /* Remove from the batch list */ 235 233 list_remove(&batch->link); 236 usb_log_debug("Batch(%p) removed (%s) from %s, next: %x.\n", 237 batch, qpos, instance->name, batch_qh(batch)->next); 234 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " removed (%s) " 235 "from %s, next: %x.\n", 236 batch, USB_TRANSFER_BATCH_ARGS(*batch), 237 qpos, instance->name, batch_qh(batch)->next); 238 238 } 239 239 /**
Note:
See TracChangeset
for help on using the changeset viewer.