Changeset 1f43c8f in mainline for uspace/lib/usb/src/hcdrv.c


Ignore:
Timestamp:
2010-11-28T22:14:41Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
78f01ff9, 7972b51
Parents:
ba7f671
Message:

Bugfixes and workarounds

Fixed problem when VHC died due to uninitialized list.

Another workaround for devman. Probably another deadlock. Oh, well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hcdrv.c

    rba7f671 r1f43c8f  
    5454};
    5555
    56 int usb_add_hc_device(device_t *dev)
    57 {
     56static usb_hc_device_t *usb_hc_device_create(device_t *dev) {
    5857        usb_hc_device_t *hc_dev = malloc(sizeof (usb_hc_device_t));
     58
    5959        list_initialize(&hc_dev->link);
     60        list_initialize(&hc_dev->hubs);
     61        list_initialize(&hc_dev->attached_devices);
    6062        hc_dev->transfer_ops = NULL;
    6163
     
    6365        dev->ops = &usb_device_ops;
    6466        hc_dev->generic->driver_data = hc_dev;
     67
     68        return hc_dev;
     69}
     70
     71int usb_add_hc_device(device_t *dev)
     72{
     73        usb_hc_device_t *hc_dev = usb_hc_device_create(dev);
    6574
    6675        int rc = hc_driver->add_hc(hc_dev);
     
    8594         */
    8695        printf("%s: trying to add USB HID child device...\n", hc_driver->name);
    87         rc = usb_hc_add_child_device(dev, USB_KBD_DEVICE_NAME, "usb&hid");
     96        rc = usb_hc_add_child_device(dev, USB_KBD_DEVICE_NAME, "usb&hid", false);
    8897        if (rc != EOK) {
    8998                printf("%s: adding USB HID child failed...\n", hc_driver->name);
Note: See TracChangeset for help on using the changeset viewer.