Changes in / [3f2af64:4776ba9] in mainline
- Location:
- uspace
- Files:
-
- 2 added
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/iface.c
r3f2af64 r4776ba9 63 63 } 64 64 65 usb_log_debug("%s %d:%d %zu(%zu).\n", 66 name, target.address, target.endpoint, size, ep->max_packet_size); 67 65 68 const size_t bw = bandwidth_count_usb11( 66 69 ep->speed, ep->transfer_type, size, ep->max_packet_size); … … 68 71 usb_log_error("Endpoint(%d:%d) %s needs %zu bw " 69 72 "but only %zu is reserved.\n", 70 name, target.address, target.endpoint, bw, res_bw);73 target.address, target.endpoint, name, bw, res_bw); 71 74 return ENOSPC; 72 75 } 73 usb_log_debug("%s %d:%d %zu(%zu).\n",74 name, target.address, target.endpoint, size, ep->max_packet_size);75 76 76 77 *batch = batch_get( … … 157 158 hc_t *hc = fun_to_hc(fun); 158 159 assert(hc); 159 if (address == hc->rh.address) 160 return EOK; 160 161 161 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 162 162 if (speed >= USB_SPEED_MAX) { 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
r3f2af64 r4776ba9 63 63 } 64 64 65 usb_log_debug("%s %d:%d %zu(%zu).\n", 66 name, target.address, target.endpoint, size, ep->max_packet_size); 67 65 68 const size_t bw = bandwidth_count_usb11( 66 69 ep->speed, ep->transfer_type, size, ep->max_packet_size); … … 68 71 usb_log_error("Endpoint(%d:%d) %s needs %zu bw " 69 72 "but only %zu is reserved.\n", 70 name, target.address, target.endpoint, bw, res_bw);73 target.address, target.endpoint, name, bw, res_bw); 71 74 return ENOSPC; 72 75 } 73 usb_log_debug("%s %d:%d %zu(%zu).\n",74 name, target.address, target.endpoint, size, ep->max_packet_size);75 76 76 77 *batch = batch_get( … … 146 147 hc_t *hc = fun_to_hc(fun); 147 148 assert(hc); 149 const size_t size = max_packet_size; 150 int ret; 148 151 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 149 152 if (speed >= USB_SPEED_MAX) { 150 153 speed = ep_speed; 151 154 } 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; 155 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n", 156 address, endpoint, usb_str_transfer_type(transfer_type), 157 usb_str_speed(speed), direction, size, max_packet_size, interval); 158 157 159 158 160 endpoint_t *ep = malloc(sizeof(endpoint_t)); … … 166 168 } 167 169 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 170 ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size); 173 171 if (ret != EOK) { -
uspace/lib/usb/src/host/endpoint.c
r3f2af64 r4776ba9 99 99 assert(instance); 100 100 if (instance->address == target.address && 101 instance->endpoint == target.endpoint)101 (instance->endpoint == target.endpoint || target.endpoint == 0)) 102 102 instance->toggle = 0; 103 103 }
Note:
See TracChangeset
for help on using the changeset viewer.