Page MenuHomeFreeBSD

D57146.diff
No OneTemporary

D57146.diff

diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -3898,10 +3898,8 @@
*/
switch (xhci_get_endpoint_state(udev, epno)) {
case XHCI_EPCTX_0_EPSTATE_DISABLED:
- drop = 0;
- break;
case XHCI_EPCTX_0_EPSTATE_STOPPED:
- drop = 1;
+ drop = 0;
break;
case XHCI_EPCTX_0_EPSTATE_HALTED:
err = xhci_cmd_reset_ep(sc, 0, epno, index);
@@ -3910,9 +3908,15 @@
DPRINTF("Could not reset endpoint %u\n", epno);
break;
default:
- drop = 1;
+ /*
+ * xHCI spec 4.6.8:
+ * The Drop and Add operation resets the toggle bit, which can
+ * cause a toggle mismatch between the device and host. As a
+ * result, xHCI may refuse to receive or process the packet.
+ */
err = xhci_cmd_stop_ep(sc, 0, epno, index);
- if (err != 0)
+ drop = (err != 0);
+ if (drop)
DPRINTF("Could not stop endpoint %u\n", epno);
break;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Aug 15, 5:30 AM (11 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33443337
Default Alt Text
D57146.diff (947 B)

Event Timeline