diff options
author | gallatin <gallatin@FreeBSD.org> | 2007-05-23 15:31:00 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2007-05-23 15:31:00 +0000 |
commit | 6d54eae283019ab6588f1d2a151fdfaaceb258c1 (patch) | |
tree | d42f2ab7b50f70f49be7a82e6b21f5f637055172 /sys/dev/pci/pci_pci.c | |
parent | 5b7b92672756b08797850220173b1931765163b3 (diff) | |
download | FreeBSD-src-6d54eae283019ab6588f1d2a151fdfaaceb258c1.zip FreeBSD-src-6d54eae283019ab6588f1d2a151fdfaaceb258c1.tar.gz |
Fix a typo in pcib_alloc_msi{x} which resulted in the
device's, not the bridge's, softc to be used to check the
PCIB_DISABLE_MSI flag. This resulted in randomly allowing
or denying MSI interrupts based on whatever value the driver
happened to store at sizeof(device_t) bytes into its softc.
I noticed this when I stopped getting MSI interrupts
after slighly re-arranging mxge's softc yesterday.
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r-- | sys/dev/pci/pci_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 1b9a3eb..e5204e0 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -551,7 +551,7 @@ pcib_route_interrupt(device_t pcib, device_t dev, int pin) int pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) { - struct pcib_softc *sc = device_get_softc(dev); + struct pcib_softc *sc = device_get_softc(pcib); device_t bus; if (sc->flags & PCIB_DISABLE_MSI) @@ -575,7 +575,7 @@ pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs) int pcib_alloc_msix(device_t pcib, device_t dev, int *irq) { - struct pcib_softc *sc = device_get_softc(dev); + struct pcib_softc *sc = device_get_softc(pcib); device_t bus; if (sc->flags & PCIB_DISABLE_MSI) |