Changeset 391d55b in mainline for uspace/drv/uhci-hcd/iface.c
- Timestamp:
- 2011-04-06T18:27:49Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5876d36
- Parents:
- 6ce42e85
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r6ce42e85 r391d55b 194 194 target.address, target.endpoint, size, max_packet_size); 195 195 196 size_t res_bw; 196 197 endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager, 197 target.address, target.endpoint, USB_DIRECTION_OUT, NULL);198 target.address, target.endpoint, USB_DIRECTION_OUT, &res_bw); 198 199 if (ep == NULL) { 199 200 usb_log_error("Endpoint(%d:%d) not registered for INT OUT.\n", 200 201 target.address, target.endpoint); 202 return ENOENT; 203 } 204 const size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type, 205 size, ep->max_packet_size); 206 if (res_bw < bw) 207 { 208 usb_log_error("Endpoint(%d:%d) INT IN needs %zu bw " 209 "but only %zu is reserved.\n", 210 target.address, target.endpoint, bw, res_bw); 201 211 return ENOENT; 202 212 } … … 241 251 target.address, target.endpoint, size, max_packet_size); 242 252 253 size_t res_bw; 243 254 endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager, 244 target.address, target.endpoint, USB_DIRECTION_IN, NULL);255 target.address, target.endpoint, USB_DIRECTION_IN, &res_bw); 245 256 if (ep == NULL) { 246 257 usb_log_error("Endpoint(%d:%d) not registered for INT IN.\n", 247 258 target.address, target.endpoint); 248 259 return ENOENT; 249 260 } 261 const size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type, 262 size, ep->max_packet_size); 263 if (res_bw < bw) 264 { 265 usb_log_error("Endpoint(%d:%d) INT IN needs %zu bw " 266 "but only %zu bw is reserved.\n", 267 target.address, target.endpoint, bw, res_bw); 268 return ENOENT; 269 } 270 250 271 assert(ep->speed == 251 272 usb_device_keeper_get_speed(&hc->manager, target.address));
Note:
See TracChangeset
for help on using the changeset viewer.