diff options
Diffstat (limited to 'sys/dev/usb/controller/xhci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 49bd914..6f5441a 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -98,18 +98,23 @@ TUNABLE_INT("hw.usb.xhci.streams", &xhcistreams); static int xhcidebug; static int xhciroute; static int xhcipolling; +static int xhcidma32; SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, - &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); + &xhciroute, 0, "Routing bitmap for switching EHCI ports to the XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, - &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); + &xhcipolling, 0, "Set to enable software interrupt polling for the XHCI controller"); TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, dma32, CTLFLAG_RWTUN, + &xhcidma32, 0, "Set to only use 32-bit DMA for the XHCI controller"); +TUNABLE_INT("hw.usb.xhci.dma32", &xhcidma32); #else #define xhciroute 0 +#define xhcidma32 0 #endif #define XHCI_INTR_ENDPT 1 @@ -580,7 +585,7 @@ xhci_halt_controller(struct xhci_softc *sc) } usb_error_t -xhci_init(struct xhci_softc *sc, device_t self) +xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) { uint32_t temp; @@ -627,7 +632,8 @@ xhci_init(struct xhci_softc *sc, device_t self) } /* get DMA bits */ - sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + sc->sc_bus.dma_bits = (XHCI_HCS0_AC64(temp) && + xhcidma32 == 0 && dma32 == 0) ? 64 : 32; device_printf(self, "%d bytes context size, %d-bit DMA\n", sc->sc_ctx_is_64_byte ? 64 : 32, (int)sc->sc_bus.dma_bits); |