summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-03-03 10:21:54 +0000
committerhselasky <hselasky@FreeBSD.org>2015-03-03 10:21:54 +0000
commitf3a1bcb90195864cc3a7a7ed913d610f297187b9 (patch)
tree9f5998a8f0649c856c248f413818fcb734a2efa7
parent6e4d5a7168cd2b4477b7a3e4cef6729e6af85521 (diff)
downloadFreeBSD-src-f3a1bcb90195864cc3a7a7ed913d610f297187b9.zip
FreeBSD-src-f3a1bcb90195864cc3a7a7ed913d610f297187b9.tar.gz
Add quirk for USB 3.0 controllers which don't support 64-bit DMA.
MFC after: 3 days Submitted by: Gary Jennejohn <gljennjohn@gmail.com>
-rw-r--r--sys/dev/usb/controller/xhci_pci.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index 9821814..c2367f4 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -180,6 +180,7 @@ xhci_pci_attach(device_t self)
{
struct xhci_softc *sc = device_get_softc(self);
int count, err, rid;
+ uint8_t usedma32;
rid = PCI_XHCI_CBMEM;
sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid,
@@ -192,7 +193,17 @@ xhci_pci_attach(device_t self)
sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res);
sc->sc_io_size = rman_get_size(sc->sc_io_res);
- if (xhci_init(sc, self, 0)) {
+ /* check for USB 3.0 controllers which don't support 64-bit DMA */
+ switch (pci_get_devid(self)) {
+ case 0x01941033: /* NEC uPD720200 USB 3.0 controller */
+ usedma32 = 1;
+ break;
+ default:
+ usedma32 = 0;
+ break;
+ }
+
+ if (xhci_init(sc, self, usedma32)) {
device_printf(self, "Could not initialize softc\n");
bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM,
sc->sc_io_res);
OpenPOWER on IntegriCloud