Changeset 3b5d1535 in mainline for uspace/drv/usbhub/usbhub.c
- Timestamp:
- 2011-02-23T10:28:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb48f61
- Parents:
- e936e8e (diff), eb1a2f4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.c
re936e8e r3b5d1535 33 33 */ 34 34 35 #include <d river.h>35 #include <ddf/driver.h> 36 36 #include <bool.h> 37 37 #include <errno.h> … … 52 52 #include "usb/classes/classes.h" 53 53 54 static d evice_ops_t hub_device_ops = {54 static ddf_dev_ops_t hub_device_ops = { 55 55 .interfaces[USB_DEV_IFACE] = &usb_iface_hub_impl 56 56 }; … … 79 79 */ 80 80 static int usb_hub_init_communication(usb_hub_info_t * hub){ 81 usb_log_debug("Initializing hub USB communication (hub->device->handle=%zu).\n", hub->device->handle); 81 82 int opResult; 82 83 opResult = usb_device_connection_initialize_from_device( … … 88 89 return opResult; 89 90 } 91 usb_log_debug("Initializing USB wire abstraction.\n"); 90 92 opResult = usb_hc_connection_initialize_from_device(&hub->connection, 91 93 hub->device); … … 95 97 return opResult; 96 98 } 99 usb_log_debug("Initializing default control pipe.\n"); 97 100 opResult = usb_endpoint_pipe_initialize_default_control(&hub->endpoints.control, 98 101 &hub->device_connection); … … 222 225 * @return pointer to created structure or NULL in case of error 223 226 */ 224 usb_hub_info_t * usb_create_hub_info(d evice_t * device) {227 usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device) { 225 228 usb_hub_info_t* result = usb_new(usb_hub_info_t); 226 229 result->device = device; … … 291 294 * @return 292 295 */ 293 int usb_add_hub_device(d evice_t *dev) {296 int usb_add_hub_device(ddf_dev_t *dev) { 294 297 dprintf(USB_LOG_LEVEL_INFO, "add_hub_device(handle=%d)", (int) dev->handle); 295 298 296 dev->ops = &hub_device_ops; 299 //dev->ops = &hub_device_ops; 300 (void) hub_device_ops; 297 301 298 302 usb_hub_info_t * hub_info = usb_create_hub_info(dev); … … 450 454 //?? 451 455 opResult = usb_device_register_child_in_devman(new_device_address, 452 hub->connection.hc_handle, hub->device, &child_handle); 456 hub->connection.hc_handle, hub->device, &child_handle, 457 NULL, NULL, NULL); 453 458 454 459 if (opResult != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.