Changeset 296fcce in mainline
- Timestamp:
- 2014-01-24T20:44:51Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdaaad00
- Parents:
- 0a751aa
- Location:
- uspace/drv/bus/usb/ehci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/endpoint_list.c
r0a751aa r296fcce 122 122 } 123 123 124 /** Add endpoint to the beginning of the list and queue.125 *126 * @param[in] instance List to use.127 * @param[in] endpoint Endpoint to add.128 *129 * The endpoint is added to the end of the list and queue.130 */131 void endpoint_list_prepend_ep(endpoint_list_t *instance, ehci_endpoint_t *ep)132 {133 assert(instance);134 assert(ep);135 assert(ep->qh);136 usb_log_debug2("Queue %s: Prepend endpoint(%p).\n", instance->name, ep);137 138 fibril_mutex_lock(&instance->guard);139 ep->qh->horizontal = instance->list_head->horizontal;140 /* Make sure QH is updated */141 write_barrier();142 /* Add QH to the hw queue */143 qh_append_qh(instance->list_head, ep->qh);144 /* Add to the sw list */145 list_prepend(&ep->link, &instance->endpoint_list);146 fibril_mutex_unlock(&instance->guard);147 148 }149 124 /** Remove endpoint from the list and queue. 150 125 * -
uspace/drv/bus/usb/ehci/endpoint_list.h
r0a751aa r296fcce 74 74 int endpoint_list_init(endpoint_list_t *instance, const char *name); 75 75 void endpoint_list_append_ep(endpoint_list_t *instance, ehci_endpoint_t *ep); 76 void endpoint_list_prepend_ep(endpoint_list_t *instance, ehci_endpoint_t *ep);77 76 void endpoint_list_remove_ep(endpoint_list_t *instance, ehci_endpoint_t *ep); 78 77 #endif -
uspace/drv/bus/usb/ehci/hc.c
r0a751aa r296fcce 215 215 { 216 216 case USB_TRANSFER_CONTROL: 217 endpoint_list_prepend_ep(&instance->async_list, ehci_ep);218 break;219 217 case USB_TRANSFER_BULK: 220 218 endpoint_list_append_ep(&instance->async_list, ehci_ep);
Note:
See TracChangeset
for help on using the changeset viewer.