Changeset ffa96c2 in mainline for uspace/drv/bus
- Timestamp:
- 2014-07-25T17:52:58Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a861ccb3
- Parents:
- b5111c46
- Location:
- uspace/drv/bus/usb
- Files:
-
- 3 edited
-
uhcirh/port.c (modified) (1 diff)
-
usbhub/port.c (modified) (2 diffs)
-
vhc/hub.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/port.c
rb5111c46 rffa96c2 269 269 int ret, count = MAX_ERROR_COUNT; 270 270 do { 271 ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 271 port->attached_device.fun = ddf_fun_create(port->rh, fun_inner, 272 NULL); 273 if (port->attached_device.fun == NULL) { 274 ret = ENOMEM; 275 continue; 276 } 277 278 ret = usb_hc_new_device_wrapper(port->rh, 279 port->attached_device.fun, 280 &port->hc_connection, 272 281 speed, uhci_port_reset_enable, port, 273 &port->attached_device.address, NULL, NULL, 274 &port->attached_device.fun); 282 &port->attached_device.address, NULL); 283 284 if (ret != EOK) { 285 ddf_fun_destroy(port->attached_device.fun); 286 port->attached_device.fun = NULL; 287 } 288 275 289 } while (ret != EOK && count-- > 0); 276 290 -
uspace/drv/bus/usb/usbhub/port.c
rb5111c46 rffa96c2 424 424 ddf_fun_t *child_fun; 425 425 426 child_fun = ddf_fun_create(data->hub->usb_device->ddf_dev, 427 fun_inner, NULL); 428 if (child_fun == NULL) 429 return ENOMEM; 430 426 431 const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev, 427 &data->hub->usb_device->hc_conn, data->speed, enable_port_callback,428 data->port, &new_address, NULL, NULL, &child_fun);432 child_fun, &data->hub->usb_device->hc_conn, data->speed, 433 enable_port_callback, data->port, &new_address, NULL); 429 434 430 435 if (rc == EOK) { … … 440 445 ddf_fun_get_handle(child_fun)); 441 446 } else { 447 ddf_fun_destroy(child_fun); 442 448 usb_log_error("Failed registering device on port %zu: %s.\n", 443 449 data->port->port_number, str_error(rc)); -
uspace/drv/bus/usb/vhc/hub.c
rb5111c46 rffa96c2 114 114 115 115 ddf_fun_t *hub_dev; 116 rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), &hc_conn, USB_SPEED_FULL, 117 pretend_port_rest, NULL, NULL, &rh_ops, hc_dev, &hub_dev); 116 117 hub_dev = ddf_fun_create(ddf_fun_get_dev(hc_dev), fun_inner, NULL); 118 if (hub_dev == NULL) { 119 rc = ENOMEM; 120 usb_log_fatal("Failed to create root hub: %s.\n", 121 str_error(rc)); 122 return rc; 123 } 124 125 rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), hub_dev, 126 &hc_conn, USB_SPEED_FULL, pretend_port_rest, NULL, NULL, &rh_ops); 118 127 if (rc != EOK) { 119 128 usb_log_fatal("Failed to create root hub: %s.\n", 120 129 str_error(rc)); 130 ddf_fun_destroy(hub_dev); 121 131 } 122 132
Note:
See TracChangeset
for help on using the changeset viewer.
