diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -487,6 +487,10 @@ typedef int (xhci_port_route_t)(device_t, uint32_t, uint32_t); +enum xhci_quirks { + XHCI_QUIRK_DISABLE_PORT_PED = 0x00000001, +}; + struct xhci_softc { struct xhci_hw_softc sc_hw; /* base device */ @@ -563,6 +567,9 @@ /* vendor string for root HUB */ char sc_vendor[16]; + + /* XHCI quirks. */ + uint32_t sc_quirks; }; #define XHCI_CMD_LOCK(sc) sx_xlock(&(sc)->sc_cmd_sx) 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 @@ -3392,7 +3392,8 @@ XWRITE4(sc, oper, port, v | XHCI_PS_PRC); break; case UHF_PORT_ENABLE: - XWRITE4(sc, oper, port, v | XHCI_PS_PED); + if ((sc->sc_quirks & XHCI_QUIRK_DISABLE_PORT_PED) == 0) + XWRITE4(sc, oper, port, v | XHCI_PS_PED); break; case UHF_PORT_POWER: XWRITE4(sc, oper, port, v & ~XHCI_PS_PP);