Changeset 86b4ee0 in mainline
- Timestamp:
- 2011-04-10T09:09:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ede0c3
- Parents:
- edc4c66
- Location:
- uspace/drv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/iface.c
redc4c66 r86b4ee0 68 68 usb_log_error("Endpoint(%d:%d) %s needs %zu bw " 69 69 "but only %zu is reserved.\n", 70 name, target.address, target.endpoint, bw, res_bw);70 target.address, target.endpoint, name, bw, res_bw); 71 71 return ENOSPC; 72 72 } … … 163 163 speed = ep_speed; 164 164 } 165 const size_t size = 166 (transfer_type == USB_TRANSFER_INTERRUPT 167 || transfer_type == USB_TRANSFER_ISOCHRONOUS) ? 168 max_packet_size : 0; 165 const size_t size = max_packet_size; 169 166 int ret; 167 168 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n", 169 address, endpoint, usb_str_transfer_type(transfer_type), 170 usb_str_speed(speed), direction, size, max_packet_size, interval); 170 171 171 172 endpoint_t *ep = malloc(sizeof(endpoint_t)); … … 178 179 return ret; 179 180 } 180 181 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",182 address, endpoint, usb_str_transfer_type(transfer_type),183 usb_str_speed(speed), direction, size, max_packet_size, interval);184 181 185 182 ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size); -
uspace/drv/uhci-hcd/iface.c
redc4c66 r86b4ee0 68 68 usb_log_error("Endpoint(%d:%d) %s needs %zu bw " 69 69 "but only %zu is reserved.\n", 70 name, target.address, target.endpoint, bw, res_bw);70 target.address, target.endpoint, name, bw, res_bw); 71 71 return ENOSPC; 72 72 } … … 146 146 hc_t *hc = fun_to_hc(fun); 147 147 assert(hc); 148 const size_t size = max_packet_size; 149 int ret; 148 150 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 149 151 if (speed >= USB_SPEED_MAX) { 150 152 speed = ep_speed; 151 153 } 152 const size_t size = 153 (transfer_type == USB_TRANSFER_INTERRUPT 154 || transfer_type == USB_TRANSFER_ISOCHRONOUS) ? 155 max_packet_size : 0; 156 int ret; 154 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n", 155 address, endpoint, usb_str_transfer_type(transfer_type), 156 usb_str_speed(speed), direction, size, max_packet_size, interval); 157 157 158 158 159 endpoint_t *ep = malloc(sizeof(endpoint_t)); … … 166 167 } 167 168 168 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",169 address, endpoint, usb_str_transfer_type(transfer_type),170 usb_str_speed(speed), direction, size, max_packet_size, interval);171 172 169 ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size); 173 170 if (ret != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.