Changeset 53db806 in mainline for uspace/drv/bus


Ignore:
Timestamp:
2017-12-10T22:42:44Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7d957b2
Parents:
889146e
Message:

xhci bus: fix setup of FS device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/bus.c

    r889146e r53db806  
    180180        }
    181181
    182         fibril_mutex_lock(&bus->base.guard);
    183182        /* Assign an address to the device */
    184183        if ((err = address_device(hc, xhci_dev))) {
     
    187186        }
    188187
     188        /* Setup EP0 might already need to issue a transfer. */
     189        fibril_mutex_lock(&bus->base.guard);
     190        assert(bus->devices_by_slot[xhci_dev->slot_id] == NULL);
     191        bus->devices_by_slot[xhci_dev->slot_id] = xhci_dev;
     192        fibril_mutex_unlock(&bus->base.guard);
     193
    189194        if ((err = setup_ep0_packet_size(hc, xhci_dev))) {
    190195                usb_log_error("Failed to setup control endpoint of the new device: %s", str_error(err));
    191196                goto err_address;
    192197        }
    193 
    194         assert(bus->devices_by_slot[xhci_dev->slot_id] == NULL);
    195         bus->devices_by_slot[xhci_dev->slot_id] = xhci_dev;
    196         fibril_mutex_unlock(&bus->base.guard);
    197198
    198199        /* Read the device descriptor, derive the match ids */
Note: See TracChangeset for help on using the changeset viewer.