summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_pci.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2013-07-09 23:12:26 +0000
committermarius <marius@FreeBSD.org>2013-07-09 23:12:26 +0000
commit691f35718e7b841b431b170da764ea644755e29a (patch)
tree5da5dfc8ade1bd64946d0c34e8e5639953727710 /sys/dev/pci/pci_pci.c
parentb8b7a65ef6e19f27c3ddc091150988b207795128 (diff)
downloadFreeBSD-src-691f35718e7b841b431b170da764ea644755e29a.zip
FreeBSD-src-691f35718e7b841b431b170da764ea644755e29a.tar.gz
- As it turns out, not only MSI-X is broken for devices passed through by
VMware up to at least ESXi 5.1. Actually, using INTx in that case instead may still result in interrupt storms, with MSI being the only working option in some configurations. So introduce a PCI_QUIRK_DISABLE_MSIX quirk which only blacklists MSI-X but not also MSI and use it for the VMware PCI-PCI-bridges. Note that, currently, we still assume that if MSI doesn't work, MSI-X won't work either - but that's part of the internal logic and not guaranteed as part of the API contract. While at it, add and employ a pci_has_quirk() helper. Reported and tested by: Paul Bucher - Use NULL instead of 0 for pointers. Submitted by: jhb (mostly) Approved by: jhb MFC after: 3 days
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r--sys/dev/pci/pci_pci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index a378a07..3ec5879 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -100,7 +100,7 @@ static device_method_t pcib_methods[] = {
static devclass_t pcib_devclass;
DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc));
-DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0);
+DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, NULL, NULL);
#ifdef NEW_PCIB
/*
@@ -624,6 +624,9 @@ pcib_attach_common(device_t dev)
if (pci_msi_device_blacklisted(dev))
sc->flags |= PCIB_DISABLE_MSI;
+ if (pci_msix_device_blacklisted(dev))
+ sc->flags |= PCIB_DISABLE_MSIX;
+
/*
* Intel 815, 845 and other chipsets say they are PCI-PCI bridges,
* but have a ProgIF of 0x80. The 82801 family (AA, AB, BAM/CAM,
@@ -1379,7 +1382,7 @@ pcib_alloc_msix(device_t pcib, device_t dev, int *irq)
struct pcib_softc *sc = device_get_softc(pcib);
device_t bus;
- if (sc->flags & PCIB_DISABLE_MSI)
+ if (sc->flags & PCIB_DISABLE_MSIX)
return (ENXIO);
bus = device_get_parent(pcib);
return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
OpenPOWER on IntegriCloud