Changeset 71ed4849 in mainline for uspace/drv
- Timestamp:
- 2010-12-28T14:00:36Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f8a0cd6
- Parents:
- de2c901
- Location:
- uspace/drv
- Files:
-
- 5 edited
-
uhci/main.c (modified) (2 diffs)
-
usbhub/usbhub.c (modified) (4 diffs)
-
usbkbd/main.c (modified) (2 diffs)
-
vhc/hcd.c (modified) (2 diffs)
-
vhc/hub.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/main.c
rde2c901 r71ed4849 27 27 */ 28 28 #include <usb/hcdhubd.h> 29 #include <usb_iface.h> 29 30 #include <usb/debug.h> 30 31 #include <errno.h> … … 32 33 #include "uhci.h" 33 34 35 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle) 36 { 37 /* This shall be called only for the UHCI itself. */ 38 assert(dev->parent == NULL); 39 40 *handle = dev->handle; 41 return EOK; 42 } 43 44 static usb_iface_t hc_usb_iface = { 45 .get_hc_handle = usb_iface_get_hc_handle 46 }; 47 34 48 static device_ops_t uhci_ops = { 35 .interfaces[USBHC_DEV_IFACE] = &uhci_iface, 49 .interfaces[USB_DEV_IFACE] = &hc_usb_iface, 50 .interfaces[USBHC_DEV_IFACE] = &uhci_iface 36 51 }; 37 52 -
uspace/drv/usbhub/usbhub.c
rde2c901 r71ed4849 37 37 #include <errno.h> 38 38 39 #include <usb hc_iface.h>39 #include <usb_iface.h> 40 40 #include <usb/usbdrv.h> 41 41 #include <usb/descriptor.h> … … 46 46 #include "usbhub_private.h" 47 47 #include "port_status.h" 48 49 static usb_iface_t hub_usb_iface = { 50 .get_hc_handle = usb_drv_find_hc 51 }; 52 53 static device_ops_t hub_device_ops = { 54 .interfaces[USB_DEV_IFACE] = &hub_usb_iface 55 }; 48 56 49 57 //********************************************* … … 135 143 * connected devices. 136 144 */ 145 dev->ops = &hub_device_ops; 137 146 138 147 //create the hub structure 139 148 //get hc connection 140 int hc = usb_drv_hc_connect(dev, 0); 149 int hc = usb_drv_hc_connect_auto(dev, 0); 150 if (hc < 0) { 151 return hc; 152 } 141 153 142 154 usb_hub_info_t * hub_info = usb_create_hub_info(dev, hc); … … 464 476 * Connect to respective HC. 465 477 */ 466 int hc = usb_drv_hc_connect (hub_info->device, 0);478 int hc = usb_drv_hc_connect_auto(hub_info->device, 0); 467 479 if (hc < 0) { 468 480 continue; -
uspace/drv/usbkbd/main.c
rde2c901 r71ed4849 190 190 // get phone to my HC and save it as my parent's phone 191 191 // TODO: maybe not a good idea if DDF will use parent_phone 192 kbd_dev->device->parent_phone = usb_drv_hc_connect (dev, 0);192 kbd_dev->device->parent_phone = usb_drv_hc_connect_auto(dev, 0); 193 193 194 194 kbd_dev->address = usb_drv_get_my_address(dev->parent_phone, … … 325 325 * Not supported yet, skip.. 326 326 */ 327 // int phone = usb_drv_hc_connect (dev, 0);327 // int phone = usb_drv_hc_connect_auto(dev, 0); 328 328 // if (phone < 0) { 329 329 // /* -
uspace/drv/vhc/hcd.c
rde2c901 r71ed4849 46 46 47 47 #include <usb/usb.h> 48 #include <usb_iface.h> 48 49 #include "vhcd.h" 49 50 #include "hc.h" … … 52 53 #include "conn.h" 53 54 55 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle) 56 { 57 /* This shall be called only for VHC device. */ 58 assert(dev->parent == NULL); 59 60 *handle = dev->handle; 61 return EOK; 62 } 63 64 static usb_iface_t hc_usb_iface = { 65 .get_hc_handle = usb_iface_get_hc_handle 66 }; 67 54 68 static device_ops_t vhc_ops = { 55 69 .interfaces[USBHC_DEV_IFACE] = &vhc_iface, 70 .interfaces[USB_DEV_IFACE] = &hc_usb_iface, 56 71 .default_handler = default_connection_handler 57 72 }; -
uspace/drv/vhc/hub.c
rde2c901 r71ed4849 79 79 device_t *hc_dev = (device_t *) arg; 80 80 81 int hc = usb_drv_hc_connect(hc_dev, IPC_FLAG_BLOCKING);81 int hc = usb_drv_hc_connect(hc_dev, hc_dev->handle, IPC_FLAG_BLOCKING); 82 82 if (hc < 0) { 83 83 printf(NAME ": failed to register root hub\n");
Note:
See TracChangeset
for help on using the changeset viewer.
