Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F11663712
xhci.diff
hselasky (Hans Petter Selasky)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
•
hselasky
Nov 11 2020, 2:37 PM
2020-11-11 14:37:35 (UTC+0)
Size
964 B
Referenced Files
None
Subscribers
None
xhci.diff
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3084593
Default Alt Text
xhci.diff (964 B)
Attached To
Mode
D27174: Allow user to configure endpoints twice
Attached
Detach File
Event Timeline
Log In to Comment