Permalink
Browse files

MFC r253398:

Add a tunable to force disable MSI use for xhci(4).

Approved by:	re (delphij)
  • Loading branch information...
1 parent 3ffe17d commit edf4181b00752038007c09a73acd92ee129fd108 @kostikbel kostikbel committed Jul 19, 2013
Showing with 12 additions and 7 deletions.
  1. +12 −7 sys/dev/usb/controller/xhci_pci.c
@@ -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,

0 comments on commit edf4181

Please sign in to comment.