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.
This commit is contained in:
Andrew Gallatin 2007-05-23 15:31:00 +00:00
parent 302e130edc
commit bd82bbb145

View File

@ -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)