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,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to