Changeset fb8927d in mainline
- Timestamp:
- 2011-04-06T19:30:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1e70157
- Parents:
- 88dd355
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r88dd355 rfb8927d 55 55 usb_device_keeper_reserve_default_address(&hc->manager, speed); 56 56 return EOK; 57 #if 0 58 endpoint_t *ep = malloc(sizeof(endpoint_t)); 59 if (ep == NULL) 60 return ENOMEM; 61 const size_t max_packet_size = speed == USB_SPEED_LOW ? 8 : 64; 62 endpoint_init(ep, USB_TRANSFER_CONTROL, speed, max_packet_size); 63 int ret; 64 try_retgister: 65 ret = usb_endpoint_manager_register_ep(&hc->ep_manager, 66 USB_ADDRESS_DEFAULT, 0, USB_DIRECTION_BOTH, ep, endpoint_destroy, 0); 67 if (ret == EEXISTS) { 68 async_usleep(1000); 69 goto try_retgister; 70 } 71 if (ret != EOK) { 72 endpoint_destroy(ep); 73 } 74 return ret; 75 #endif 57 76 } 58 77 /*----------------------------------------------------------------------------*/ … … 68 87 assert(hc); 69 88 usb_log_debug("Default address release.\n"); 89 // return usb_endpoint_manager_unregister_ep(&hc->ep_manager, 90 // USB_ADDRESS_DEFAULT, 0, USB_DIRECTION_BOTH); 70 91 usb_device_keeper_release_default_address(&hc->manager); 71 92 return EOK; … … 149 170 usb_str_speed(speed), direction, size, max_packet_size, interval); 150 171 151 const size_t bw = bandwidth_count_usb11(speed, transfer_type, size, 152 max_packet_size); 172 const size_t bw = 173 (transfer_type == USB_TRANSFER_INTERRUPT 174 || transfer_type == USB_TRANSFER_ISOCHRONOUS) ? 175 bandwidth_count_usb11(speed, transfer_type, size, max_packet_size) : 176 0; 177 153 178 int ret = usb_endpoint_manager_register_ep(&hc->ep_manager, 154 179 address, endpoint, direction, ep, endpoint_destroy, bw); … … 156 181 endpoint_destroy(ep); 157 182 } 158 159 183 return ret; 160 184 }
Note:
See TracChangeset
for help on using the changeset viewer.