summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-04-27 20:08:44 +0000
committerjhb <jhb@FreeBSD.org>2011-04-27 20:08:44 +0000
commitda3b304fc1e3776979accc2d8a8e24dfc299fb05 (patch)
treedf2af84c37d2675ba89e5b02339a754c658ef70c /sys/dev/pci
parent65657fce6578ef31040fa2321c2090efc54e9ebf (diff)
downloadFreeBSD-src-da3b304fc1e3776979accc2d8a8e24dfc299fb05.zip
FreeBSD-src-da3b304fc1e3776979accc2d8a8e24dfc299fb05.tar.gz
Only align MSI message groups based on the number of messages being
allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message. Submitted by: Bret Ketchum bcketchum of gmail MFC after: 1 week
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 40e3b0c..e14dc93 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1969,7 +1969,7 @@ pci_alloc_msi_method(device_t dev, device_t child, int *count)
for (;;) {
/* Try to allocate N messages. */
error = PCIB_ALLOC_MSI(device_get_parent(dev), child, actual,
- cfg->msi.msi_msgnum, irqs);
+ actual, irqs);
if (error == 0)
break;
if (actual == 1)
OpenPOWER on IntegriCloud