Changeset 2e1d5d70 in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-03-21T10:30:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0e45e7f, f8e1a2c
- Parents:
- f0fdc7d (diff), 79c8a96 (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
rf0fdc7d r2e1d5d70 98 98 usb_log_debug2("Queue %s: Adding batch(%p).\n", instance->name, batch); 99 99 100 const uint32_t pa = addr_to_phys(batch ->qh);100 const uint32_t pa = addr_to_phys(batch_qh(batch)); 101 101 assert((pa & LINK_POINTER_ADDRESS_MASK) == pa); 102 102 103 103 /* New batch will be added to the end of the current list 104 104 * so set the link accordingly */ 105 qh_set_next_qh(batch ->qh, instance->queue_head->next);105 qh_set_next_qh(batch_qh(batch), instance->queue_head->next); 106 106 107 107 fibril_mutex_lock(&instance->guard); … … 117 117 batch_t *last = list_get_instance( 118 118 instance->batch_list.prev, batch_t, link); 119 qh_set_next_qh( last->qh, pa);119 qh_set_next_qh(batch_qh(last), pa); 120 120 } 121 121 /* Add to the driver list */ … … 178 178 batch_t *batch = list_get_instance(current, batch_t, link); 179 179 transfer_list_remove_batch(instance, batch); 180 batch_ abort(batch);180 batch_finish(batch, EIO); 181 181 } 182 182 fibril_mutex_unlock(&instance->guard); … … 194 194 { 195 195 assert(instance); 196 assert(instance->queue_head); 196 197 assert(batch); 197 assert(instance->queue_head); 198 assert(batch->qh); 198 assert(batch_qh(batch)); 199 199 usb_log_debug2( 200 200 "Queue %s: removing batch(%p).\n", instance->name, batch); … … 204 204 if (batch->link.prev == &instance->batch_list) { 205 205 /* I'm the first one here */ 206 qh_set_element_qh(instance->queue_head, batch ->qh->next);206 qh_set_element_qh(instance->queue_head, batch_qh(batch)->next); 207 207 pos = "FIRST"; 208 208 } else { 209 209 batch_t *prev = 210 210 list_get_instance(batch->link.prev, batch_t, link); 211 qh_set_next_qh( prev->qh, batch->qh->next);211 qh_set_next_qh(batch_qh(prev), batch_qh(batch)->next); 212 212 pos = "NOT FIRST"; 213 213 } … … 215 215 list_remove(&batch->link); 216 216 usb_log_debug("Batch(%p) removed (%s) from %s, next element %x.\n", 217 batch, pos, instance->name, batch ->qh->next);217 batch, pos, instance->name, batch_qh(batch)->next); 218 218 } 219 219 /**
Note:
See TracChangeset
for help on using the changeset viewer.