Changeset 8f30c2e in mainline
- Timestamp:
- 2011-04-07T14:19:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- feb10c88
- Parents:
- fd3940c1
- Location:
- uspace/drv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
rfd3940c1 r8f30c2e 88 88 ) 89 89 { 90 assert(ep); 90 91 assert(func_in == NULL || func_out == NULL); 91 92 assert(func_in != NULL || func_out != NULL); -
uspace/drv/uhci-hcd/iface.c
rfd3940c1 r8f30c2e 232 232 const size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type, 233 233 size, ep->max_packet_size); 234 if (res_bw < bw) 235 { 234 if (res_bw < bw) { 236 235 usb_log_error("Endpoint(%d:%d) INT IN needs %zu bw " 237 236 "but only %zu is reserved.\n", … … 289 288 const size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type, 290 289 size, ep->max_packet_size); 291 if (res_bw < bw) 292 { 290 if (res_bw < bw) { 293 291 usb_log_error("Endpoint(%d:%d) INT IN needs %zu bw " 294 292 "but only %zu bw is reserved.\n", … … 429 427 hc_t *hc = fun_to_hc(fun); 430 428 assert(hc); 431 usb_speed_t speed = 432 usb_device_keeper_get_speed(&hc->manager, target.address);433 usb_log_debug("Control WRITE (%d) %d:%d %zu(%zu).\n",434 speed, target.address, target.endpoint, size, max_packet_size); 429 430 usb_log_debug("Control WRITE %d:%d %zu(%zu).\n", 431 target.address, target.endpoint, size, max_packet_size); 432 435 433 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, 436 434 target.address, target.endpoint, USB_DIRECTION_BOTH, NULL); 437 435 if (ep == NULL) { 438 usb_log_ warning("Endpoint(%d:%d) not registered for CONTROL.\n",436 usb_log_error("Endpoint(%d:%d) not registered for CONTROL.\n", 439 437 target.address, target.endpoint); 440 } 438 return ENOENT; 439 } 440 assert(ep->speed == 441 usb_device_keeper_get_speed(&hc->manager, target.address)); 442 assert(ep->max_packet_size == max_packet_size); 443 assert(ep->transfer_type == USB_TRANSFER_CONTROL); 441 444 442 445 if (setup_size != 8) … … 444 447 445 448 usb_transfer_batch_t *batch = 446 batch_get(fun, target, USB_TRANSFER_CONTROL, max_packet_size, speed, 447 data, size, setup_data, setup_size, NULL, callback, arg, ep); 449 batch_get(fun, target, ep->transfer_type, ep->max_packet_size, 450 ep->speed, data, size, setup_data, setup_size, NULL, callback, 451 arg, ep); 448 452 if (!batch) 449 453 return ENOMEM; … … 478 482 hc_t *hc = fun_to_hc(fun); 479 483 assert(hc); 480 usb_speed_t speed = 481 usb_device_keeper_get_speed(&hc->manager, target.address); 482 483 usb_log_debug("Control READ(%d) %d:%d %zu(%zu).\n", 484 speed, target.address, target.endpoint, size, max_packet_size); 484 485 usb_log_debug("Control READ %d:%d %zu(%zu).\n", 486 target.address, target.endpoint, size, max_packet_size); 487 485 488 endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager, 486 489 target.address, target.endpoint, USB_DIRECTION_BOTH, NULL); 487 490 if (ep == NULL) { 488 usb_log_warning("Endpoint(%d:%d) not registered for CONTROL.\n", 489 target.address, target.endpoint); 490 } 491 usb_log_error("Endpoint(%d:%d) not registered for CONTROL.\n", 492 target.address, target.endpoint); 493 return ENOENT; 494 } 495 assert(ep->speed == 496 usb_device_keeper_get_speed(&hc->manager, target.address)); 497 assert(ep->max_packet_size == max_packet_size); 498 assert(ep->transfer_type == USB_TRANSFER_CONTROL); 499 491 500 usb_transfer_batch_t *batch = 492 batch_get(fun, target, USB_TRANSFER_CONTROL, max_packet_size, speed, 493 data, size, setup_data, setup_size, callback, NULL, arg, ep); 501 batch_get(fun, target, ep->transfer_type, ep->max_packet_size, 502 ep->speed, data, size, setup_data, setup_size, 503 callback, NULL, arg, ep); 494 504 if (!batch) 495 505 return ENOMEM; -
uspace/drv/uhci-rhd/root_hub.h
rfd3940c1 r8f30c2e 40 40 41 41 #define UHCI_ROOT_HUB_PORT_COUNT 2 42 #define ROOT_HUB_WAIT_USEC 5000000 /* 5seconds */42 #define ROOT_HUB_WAIT_USEC 250000 /* 250 miliseconds */ 43 43 44 44 typedef struct root_hub {
Note:
See TracChangeset
for help on using the changeset viewer.