aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-06-22 20:08:06 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-06-22 20:08:06 +0000
commitd456f534c983eddc56536bfa98951df19ab04edf (patch)
tree58844e24b270fc0653ee7af25db8443c11403425
parent0cb6db1d21000a926f838777e6e61e5233ffbbcb (diff)
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
Notes
Notes: svn path=/head/; revision=194644
-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 667072fe30a9..a473ad26898a 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,