From c3632bcc5019dddc0cd98f332c90aacc001b67c2 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 27 Feb 2015 12:20:03 +0000 Subject: 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. --- sys/dev/usb/controller/xhci.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/dev/usb/controller/xhci.c') 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); -- cgit v1.1