Page MenuHomeFreeBSD
Authored By
hselasky
Nov 11 2020, 2:37 PM
Size
964 B
Referenced Files
None
Subscribers
None

xhci.diff

Index: sys/dev/usb/controller/xhci.c
===================================================================
--- sys/dev/usb/controller/xhci.c (revision 367554)
+++ sys/dev/usb/controller/xhci.c (working copy)
@@ -4020,6 +4020,9 @@
struct usb_endpoint *ep)
{
struct xhci_endpoint_ext *pepext;
+ struct xhci_softc *sc;
+ uint8_t index;
+ uint8_t epno;
DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d\n",
ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode);
@@ -4036,6 +4039,17 @@
USB_BUS_LOCK(udev->bus);
pepext->trb_halted = 1;
pepext->trb_running = 0;
+
+ /*
+ * When doing an alternate setting we need to re-configure the
+ * XHCI endpoint:
+ */
+ if ((edesc->bmAttributes & UE_XFERTYPE) != UE_CONTROL) {
+ sc = XHCI_BUS2SC(udev->bus);
+ index = udev->controller_slot_id;
+ epno = XHCI_EPNO2EPID(edesc->bEndpointAddress);
+ sc->sc_hw.devs[index].ep_configured &= ~(1U << epno);
+ }
USB_BUS_UNLOCK(udev->bus);
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3084593
Default Alt Text
xhci.diff (964 B)

Event Timeline