summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-06-22 20:08:06 +0000
committerjhb <jhb@FreeBSD.org>2009-06-22 20:08:06 +0000
commit3237867ed50be86bfe610568eca4ae9d63830fce (patch)
tree58844e24b270fc0653ee7af25db8443c11403425 /sys/dev/pci
parent469e8778b5e042cb477ff76e0b63d84360257793 (diff)
downloadFreeBSD-src-3237867ed50be86bfe610568eca4ae9d63830fce.zip
FreeBSD-src-3237867ed50be86bfe610568eca4ae9d63830fce.tar.gz
Enable MSI in the MSI capability registers any time that the first message
in an MSI group is enabled, not just if the address/data pair are not initialized. Reported by: rnoland MFC after: 1 week
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 667072f..a473ad2 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -2883,8 +2883,10 @@ pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
goto bad;
dinfo->cfg.msi.msi_addr = addr;
dinfo->cfg.msi.msi_data = data;
- pci_enable_msi(child, addr, data);
}
+ if (dinfo->cfg.msi.msi_handlers == 0)
+ pci_enable_msi(child, dinfo->cfg.msi.msi_addr,
+ dinfo->cfg.msi.msi_data);
dinfo->cfg.msi.msi_handlers++;
} else {
KASSERT(dinfo->cfg.msix.msix_alloc > 0,
OpenPOWER on IntegriCloud