summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-02-27 12:20:03 +0000
committerhselasky <hselasky@FreeBSD.org>2015-02-27 12:20:03 +0000
commitc3632bcc5019dddc0cd98f332c90aacc001b67c2 (patch)
tree2fc318a3974b48179fdd0e2bce85faba5de40930 /sys/dev/usb
parent4e65f612d1a3025d2dfc18ed97357f22e68299ac (diff)
downloadFreeBSD-src-c3632bcc5019dddc0cd98f332c90aacc001b67c2.zip
FreeBSD-src-c3632bcc5019dddc0cd98f332c90aacc001b67c2.tar.gz
MFC r279233:
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.
Diffstat (limited to 'sys/dev/usb')
-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 830d505..49bd914 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -1415,6 +1415,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