mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Disable USB 3.0 streams mode by default, hence not all XHCI chipsets
implement it to avoid undefined behaviour.
This commit is contained in:
parent
5bb17266af
commit
549c5c8798
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255347
@ -87,12 +87,18 @@
|
|||||||
((struct xhci_softc *)(((uint8_t *)(bus)) - \
|
((struct xhci_softc *)(((uint8_t *)(bus)) - \
|
||||||
((uint8_t *)&(((struct xhci_softc *)0)->sc_bus))))
|
((uint8_t *)&(((struct xhci_softc *)0)->sc_bus))))
|
||||||
|
|
||||||
|
static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI");
|
||||||
|
|
||||||
|
static int xhcistreams;
|
||||||
|
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, streams, CTLFLAG_RW | CTLFLAG_TUN,
|
||||||
|
&xhcistreams, 0, "Set to enable streams mode support");
|
||||||
|
TUNABLE_INT("hw.usb.xhci.streams", &xhcistreams);
|
||||||
|
|
||||||
#ifdef USB_DEBUG
|
#ifdef USB_DEBUG
|
||||||
static int xhcidebug;
|
static int xhcidebug;
|
||||||
static int xhciroute;
|
static int xhciroute;
|
||||||
static int xhcipolling;
|
static int xhcipolling;
|
||||||
|
|
||||||
static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI");
|
|
||||||
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN,
|
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN,
|
||||||
&xhcidebug, 0, "Debug level");
|
&xhcidebug, 0, "Debug level");
|
||||||
TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug);
|
TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug);
|
||||||
@ -4127,7 +4133,8 @@ xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep,
|
|||||||
case USB_EP_MODE_DEFAULT:
|
case USB_EP_MODE_DEFAULT:
|
||||||
return (0);
|
return (0);
|
||||||
case USB_EP_MODE_STREAMS:
|
case USB_EP_MODE_STREAMS:
|
||||||
if ((ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK ||
|
if (xhcistreams == 0 ||
|
||||||
|
(ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK ||
|
||||||
udev->speed != USB_SPEED_SUPER)
|
udev->speed != USB_SPEED_SUPER)
|
||||||
return (USB_ERR_INVAL);
|
return (USB_ERR_INVAL);
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user