Changeset 83c3123 in mainline for uspace/lib/usbhost/src/iface.c
- Timestamp:
- 2011-10-27T11:40:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7265558
- Parents:
- 4267908
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/iface.c
r4267908 r83c3123 49 49 assert(hcd); 50 50 51 int ret;52 53 size_t res_bw;54 51 endpoint_t *ep = usb_endpoint_manager_get_ep(&hcd->ep_manager, 55 target.address, target.endpoint, direction , &res_bw);52 target.address, target.endpoint, direction); 56 53 if (ep == NULL) { 57 54 usb_log_error("Endpoint(%d:%d) not registered for %s.\n", … … 65 62 const size_t bw = bandwidth_count_usb11( 66 63 ep->speed, ep->transfer_type, size, ep->max_packet_size); 67 if (res_bw < bw) { 64 /* Check if we have enough bandwidth reserved */ 65 if (ep->bandwidth < bw) { 68 66 usb_log_error("Endpoint(%d:%d) %s needs %zu bw " 69 67 "but only %zu is reserved.\n", 70 target.address, target.endpoint, name, bw, res_bw);68 ep->address, ep->endpoint, name, bw, ep->bandwidth); 71 69 return ENOSPC; 72 70 } … … 84 82 } 85 83 86 ret = hcd->schedule(hcd, batch);84 const int ret = hcd->schedule(hcd, batch); 87 85 if (ret != EOK) 88 86 usb_transfer_batch_dispose(batch); … … 190 188 max_packet_size, interval); 191 189 192 endpoint_t *ep = endpoint_get( 193 address, endpoint, direction, transfer_type, speed, max_packet_size); 190 endpoint_t *ep = 191 endpoint_create(address, endpoint, direction, transfer_type, 192 speed, max_packet_size, 0); 194 193 if (!ep) 195 194 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.