diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-12-27 19:25:46 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-01-29 12:57:01 -0500 |
commit | 4ea2fa9620ec4c0c6da53d534d6a69c8a0db27cd (patch) | |
tree | a5e303f59e5c7d1010a59f4e218e8b7043db2dc8 /src/hw/usb.c | |
parent | d477d55ab90256a1251c8c881dd7c9edaa76725f (diff) | |
download | seabios-hppa-4ea2fa9620ec4c0c6da53d534d6a69c8a0db27cd.zip seabios-hppa-4ea2fa9620ec4c0c6da53d534d6a69c8a0db27cd.tar.gz seabios-hppa-4ea2fa9620ec4c0c6da53d534d6a69c8a0db27cd.tar.bz2 |
xhci: Move set_address code from xhci_control to xhci_alloc_pipe.
It's easier to run the set_address from xhci_alloc_pipe as there is
more information available there.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/usb.c')
-rw-r--r-- | src/hw/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hw/usb.c b/src/hw/usb.c index 8430e50..e1356f9 100644 --- a/src/hw/usb.c +++ b/src/hw/usb.c @@ -263,6 +263,8 @@ usb_set_address(struct usbdevice_s *usbdev) if (cntl->maxaddr >= USB_MAXADDR) return -1; + msleep(USB_TIME_RSTRCY); + // Create a pipe for the default address. struct usb_endpoint_descriptor epdesc = { .wMaxPacketSize = 8, @@ -272,8 +274,6 @@ usb_set_address(struct usbdevice_s *usbdev) if (!usbdev->defpipe) return -1; - msleep(USB_TIME_RSTRCY); - // Send set_address command. struct usb_ctrlrequest req; req.bRequestType = USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE; |