Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2013 05:28:47 +0000 (UTC)
From:      Konstantin Belousov <kib@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: r253464 - stable/9/sys/dev/usb/controller
Message-ID:  <201307190528.r6J5Sluv023223@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Jul 19 05:28:47 2013
New Revision: 253464
URL: http://svnweb.freebsd.org/changeset/base/253464

Log:
  MFC r253398:
  Add a tunable to force disable MSI use for xhci(4).
  
  Approved by:	re (delphij)

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 Jul 19 03:27:04 2013	(r253463)
+++ stable/9/sys/dev/usb/controller/xhci_pci.c	Fri Jul 19 05:28:47 2013	(r253464)
@@ -132,6 +132,9 @@ xhci_pci_probe(device_t self)
 	}
 }
 
+static int xhci_use_msi = 1;
+TUNABLE_INT("hw.usb.xhci.msi", &xhci_use_msi);
+
 static int
 xhci_pci_attach(device_t self)
 {
@@ -159,13 +162,15 @@ xhci_pci_attach(device_t self)
 	sc->sc_io_size = rman_get_size(sc->sc_io_res);
 
 	sc->sc_irq_rid = 0;
-	count = pci_msi_count(self);
-	if (count >= 1) {
-		count = 1;
-		if (pci_alloc_msi(self, &count) == 0) {
-			if (bootverbose)
-				device_printf(self, "MSI enabled\n");
-			sc->sc_irq_rid = 1;
+	if (xhci_use_msi) {
+		count = pci_msi_count(self);
+		if (count >= 1) {
+			count = 1;
+			if (pci_alloc_msi(self, &count) == 0) {
+				if (bootverbose)
+					device_printf(self, "MSI enabled\n");
+				sc->sc_irq_rid = 1;
+			}
 		}
 	}
 	sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ,



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