diff options
author | luoqi <luoqi@FreeBSD.org> | 2008-07-23 09:44:36 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 2008-07-23 09:44:36 +0000 |
commit | 2620286140b697937520b92f540813fd844d2222 (patch) | |
tree | 4e066aa66c4ced0839aa104cb426a675b9f0e5b8 /sys/dev/pci/pci_pci.c | |
parent | d27f65928a6e40f7d6391c4441edc752c1702212 (diff) | |
download | FreeBSD-src-2620286140b697937520b92f540813fd844d2222.zip FreeBSD-src-2620286140b697937520b92f540813fd844d2222.tar.gz |
SATA device on some nForce based boards could get confused if MSI is not
used but MSI to HyperTransport IRQ mapping is enabled, and would act as
if MSI is turned on, resulting in interrupt loss.
This commit will,
1. enable MSI mapping on a device only when MSI is enabled for that
device and the MSI address matches the HT mapping window.
2. enable MSI mapping on a bridge only when a downstream device is
allocated an MSI address in the mapping window
PR: kern/118842
Reviewed by: jhb
MFC after: 1 week
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r-- | sys/dev/pci/pci_pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 033ea74..13fa065 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -607,9 +607,15 @@ pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data) { device_t bus; + int error; bus = device_get_parent(pcib); - return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); + error = PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data); + if (error) + return (error); + + pci_ht_map_msi(pcib, *addr); + return (0); } /* |