Changeset db8b7ca in mainline
- Timestamp:
- 2012-12-26T19:02:51Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 34289ea
- Parents:
- d8cdf39e
- Location:
- uspace
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/port.c
rd8cdf39e rdb8b7ca 266 266 ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 267 267 speed, uhci_port_reset_enable, port, 268 &port->attached_device.address, NULL, NULL, 269 &port->attached_device.fun); 268 &port->attached_device.address, &port->attached_device.fun); 270 269 } while (ret != EOK && count-- > 0); 271 270 -
uspace/drv/bus/usb/usbhub/port.c
rd8cdf39e rdb8b7ca 426 426 const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev, 427 427 &data->hub->usb_device->hc_conn, data->speed, enable_port_callback, 428 data->port, &new_address, NULL, NULL,&child_fun);428 data->port, &new_address, &child_fun); 429 429 430 430 if (rc == EOK) { -
uspace/lib/usbdev/include/usb/dev/hub.h
rd8cdf39e rdb8b7ca 44 44 #include <usb/hc.h> 45 45 46 extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t, 47 int (*)(void *), void *, usb_address_t *, ddf_dev_ops_t *, void *, 48 ddf_fun_t **); 46 extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, 47 usb_speed_t, int (*)(void *), void *, usb_address_t *, ddf_fun_t **); 49 48 50 49 /** Info about device attached to host controller. -
uspace/lib/usbdev/include/usb/dev/recognise.h
rd8cdf39e rdb8b7ca 52 52 53 53 extern int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe, 54 ddf_dev_t *, ddf_ dev_ops_t *, void *, ddf_fun_t **);54 ddf_dev_t *, ddf_fun_t **); 55 55 56 56 #endif -
uspace/lib/usbdev/src/hub.c
rd8cdf39e rdb8b7ca 158 158 usb_hc_connection_t *hc_conn, usb_speed_t dev_speed, 159 159 int (*enable_port)(void *arg), void *arg, usb_address_t *assigned_address, 160 ddf_ dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)160 ddf_fun_t **new_fun) 161 161 { 162 162 if ((new_fun == NULL) || (hc_conn == NULL)) … … 273 273 ddf_fun_t *child_fun; 274 274 rc = usb_device_register_child_in_devman(&ctrl_pipe, 275 parent, dev_ops, new_dev_data,&child_fun);275 parent, &child_fun); 276 276 if (rc != EOK) { 277 277 goto leave_release_free_address; -
uspace/lib/usbdev/src/recognise.c
rd8cdf39e rdb8b7ca 33 33 * Functions for recognition of attached devices. 34 34 */ 35 36 /** XXX Fix this */37 #define _DDF_DATA_IMPLANT38 35 39 36 #include <sys/types.h> … … 318 315 */ 319 316 int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe, 320 ddf_dev_t *parent, ddf_dev_ops_t *dev_ops, void *dev_data, 321 ddf_fun_t **child_fun) 317 ddf_dev_t *parent, ddf_fun_t **child_fun) 322 318 { 323 319 if (child_fun == NULL || ctrl_pipe == NULL) 324 320 return EINVAL; 325 326 if (!dev_ops && dev_data) {327 usb_log_warning("Using standard fun ops with arbitrary "328 "driver data. This does not have to work.\n");329 }330 321 331 322 /** Index to append after device name for uniqueness. */ … … 354 345 } 355 346 356 if (dev_ops != NULL) 357 ddf_fun_set_ops(child, dev_ops); 358 else 359 ddf_fun_set_ops(child, &child_ops); 360 361 ddf_fun_data_implant(child, dev_data); 362 347 ddf_fun_set_ops(child, &child_ops); 363 348 /* 364 349 * Store the attached device in fun 365 350 * driver data if there is no other data 366 351 */ 367 if (!dev_data) { 368 usb_hub_attached_device_t *new_device = ddf_fun_data_alloc( 369 child, sizeof(usb_hub_attached_device_t)); 370 if (!new_device) { 371 rc = ENOMEM; 372 goto failure; 373 } 374 375 new_device->address = ctrl_pipe->wire->address; 376 new_device->fun = child; 377 } 352 usb_hub_attached_device_t *new_device = ddf_fun_data_alloc( 353 child, sizeof(usb_hub_attached_device_t)); 354 if (!new_device) { 355 rc = ENOMEM; 356 goto failure; 357 } 358 359 new_device->address = ctrl_pipe->wire->address; 360 new_device->fun = child; 378 361 379 362 match_id_list_t match_ids;
Note:
See TracChangeset
for help on using the changeset viewer.