Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2015 16:09:34 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r279694 - stable/9/sys/dev/usb/controller
Message-ID:  <201503061609.t26G9YLo020845@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Mar  6 16:09:33 2015
New Revision: 279694
URL: https://svnweb.freebsd.org/changeset/base/279694

Log:
  MFC r279563:
  Add quirk for USB 3.0 controllers which don't support 64-bit DMA.

Modified:
  stable/9/sys/dev/usb/controller/xhci_pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/controller/xhci_pci.c
==============================================================================
--- stable/9/sys/dev/usb/controller/xhci_pci.c	Fri Mar  6 16:08:10 2015	(r279693)
+++ stable/9/sys/dev/usb/controller/xhci_pci.c	Fri Mar  6 16:09:33 2015	(r279694)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503061609.t26G9YLo020845>