summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-02-24 08:53:47 +0000
committerhselasky <hselasky@FreeBSD.org>2015-02-24 08:53:47 +0000
commitb9f1e32cfa9678cfa78537ef1f085308892fddd4 (patch)
tree0a6df452bd40dbe6759767939615ee0ff8f30afe
parentb870399cc1909cf33491444a48060837e8e6e3e8 (diff)
downloadFreeBSD-src-b9f1e32cfa9678cfa78537ef1f085308892fddd4.zip
FreeBSD-src-b9f1e32cfa9678cfa78537ef1f085308892fddd4.tar.gz
Ensure that the XHCI driver will refresh the control endpoint settings
when re-enumerating a FULL speed device. Else the wrong max packet setting might be used when trying to re-enumerate a FULL speed device. MFC after: 3 days
-rw-r--r--sys/dev/usb/controller/xhci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 2ad7964..b248399 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -1411,6 +1411,13 @@ xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address)
pepext = xhci_get_endpoint_ext(udev,
&udev->ctrl_ep_desc);
+
+ /* ensure the control endpoint is setup again */
+ USB_BUS_LOCK(udev->bus);
+ pepext->trb_halted = 1;
+ pepext->trb_running = 0;
+ USB_BUS_UNLOCK(udev->bus);
+
err = xhci_configure_endpoint(udev,
&udev->ctrl_ep_desc, pepext,
0, 1, 1, 0, mps, mps, USB_EP_MODE_DEFAULT);
OpenPOWER on IntegriCloud