Changeset c83a55c in mainline for uspace/drv/bus/usb/ohci/hc.c
- Timestamp:
- 2011-10-31T06:52:54Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c25e39b
- Parents:
- e8ab32f (diff), 3ce78580 (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/bus/usb/ohci/hc.c
re8ab32f rc83a55c 142 142 if (ret != EOK) { \ 143 143 usb_log_error(message); \ 144 usb_endpoint_manager_unregister_ep( \ 145 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH);\ 144 usb_endpoint_manager_remove_ep( \ 145 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH, \ 146 NULL, NULL);\ 146 147 usb_device_manager_release( \ 147 148 &instance->generic.dev_manager, hub_address); \ … … 150 151 int ret = usb_endpoint_manager_add_ep( 151 152 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH, 152 USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0 );153 USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0, NULL, NULL); 153 154 CHECK_RET_UNREG_RETURN(ret, 154 155 "Failed to register root hub control endpoint: %s.\n", … … 192 193 list_initialize(&instance->pending_batches); 193 194 194 ret =hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11,195 hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11, 195 196 bandwidth_count_usb11); 196 CHECK_RET_RETURN(ret, "Failed to initialize generic driver: %s.\n",197 str_error(ret));198 197 instance->generic.private_data = instance; 199 198 instance->generic.schedule = hc_schedule; 200 199 instance->generic.ep_add_hook = ohci_endpoint_init; 200 instance->generic.ep_remove_hook = ohci_endpoint_fini; 201 201 202 202 ret = hc_init_memory(instance); … … 221 221 } 222 222 /*----------------------------------------------------------------------------*/ 223 void hc_enqueue_endpoint(hc_t *instance, endpoint_t *ep) 224 { 223 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep) 224 { 225 assert(instance); 226 assert(ep); 227 225 228 endpoint_list_t *list = &instance->lists[ep->transfer_type]; 226 229 ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep); 230 assert(list); 231 assert(ohci_ep); 232 227 233 /* Enqueue ep */ 228 234 switch (ep->transfer_type) { … … 247 253 } 248 254 /*----------------------------------------------------------------------------*/ 249 void hc_dequeue_endpoint(hc_t *instance, endpoint_t *ep) 250 { 255 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep) 256 { 257 assert(instance); 258 assert(ep); 259 251 260 /* Dequeue ep */ 252 261 endpoint_list_t *list = &instance->lists[ep->transfer_type]; 253 262 ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep); 263 264 assert(list); 265 assert(ohci_ep); 254 266 switch (ep->transfer_type) { 255 267 case USB_TRANSFER_CONTROL:
Note:
See TracChangeset
for help on using the changeset viewer.