Changeset eb1a2f4 in mainline for uspace/drv/vhc/hub.c
- Timestamp:
- 2011-02-22T23:30:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b5d1535, a9c674e0
- Parents:
- dbe25f1 (diff), 664af708 (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/vhc/hub.c
rdbe25f1 reb1a2f4 39 39 #include <str_error.h> 40 40 #include <stdlib.h> 41 #include <driver.h> 41 #include <ddf/driver.h> 42 #include <devman.h> 42 43 #include <usb/hub.h> 43 44 #include <usb/recognise.h> … … 46 47 #include "hub/virthub.h" 47 48 #include "vhcd.h" 49 #include "conn.h" 48 50 49 51 usbvirt_device_t virtual_hub_device; 52 static ddf_dev_ops_t rh_ops = { 53 .interfaces[USB_DEV_IFACE] = &rh_usb_iface, 54 }; 50 55 51 56 static int hub_register_in_devman_fibril(void *arg); 52 57 53 void virtual_hub_device_init(d evice_t *hc_dev)58 void virtual_hub_device_init(ddf_fun_t *hc_dev) 54 59 { 55 60 virthub_init(&virtual_hub_device); … … 83 88 int hub_register_in_devman_fibril(void *arg) 84 89 { 85 d evice_t *hc_dev = (device_t *) arg;90 ddf_fun_t *hc_dev = (ddf_fun_t *) arg; 86 91 87 92 /* … … 94 99 async_hangup(phone); 95 100 101 int rc; 102 96 103 usb_hc_connection_t hc_conn; 97 usb_hc_connection_initialize(&hc_conn, hc_dev->handle); 104 rc = usb_hc_connection_initialize(&hc_conn, hc_dev->handle); 105 assert(rc == EOK); 98 106 99 usb_hc_connection_open(&hc_conn); 107 rc = usb_hc_connection_open(&hc_conn); 108 assert(rc == EOK); 100 109 101 int rc = usb_hc_new_device_wrapper(hc_dev, &hc_conn, USB_SPEED_FULL, 110 ddf_fun_t *hub_dev; 111 rc = usb_hc_new_device_wrapper(hc_dev->dev, &hc_conn, 112 USB_SPEED_FULL, 102 113 pretend_port_rest, 0, NULL, 103 NULL, NULL );114 NULL, NULL, &rh_ops, hc_dev, &hub_dev); 104 115 if (rc != EOK) { 105 116 usb_log_fatal("Failed to create root hub: %s.\n", … … 108 119 109 120 usb_hc_connection_close(&hc_conn); 121 122 usb_log_info("Created root hub function (handle %zu).\n", 123 (size_t) hub_dev->handle); 110 124 111 125 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.