Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci allow MSI-X even with just one interrupt, on som...
details: https://anonhg.NetBSD.org/src/rev/9bd9e2f7a63d
branches: trunk
changeset: 446348:9bd9e2f7a63d
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Dec 01 13:31:48 2018 +0000
description:
allow MSI-X even with just one interrupt, on some systems MSI/INTx might
not be available (or working, for that matter)
diffstat:
sys/dev/pci/nvme_pci.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r eb9d69519184 -r 9bd9e2f7a63d sys/dev/pci/nvme_pci.c
--- a/sys/dev/pci/nvme_pci.c Sat Dec 01 13:24:45 2018 +0000
+++ b/sys/dev/pci/nvme_pci.c Sat Dec 01 13:31:48 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme_pci.c,v 1.22 2018/12/01 13:24:45 jdolecek Exp $ */
+/* $NetBSD: nvme_pci.c,v 1.23 2018/12/01 13:31:48 jdolecek Exp $ */
/* $OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.22 2018/12/01 13:24:45 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.23 2018/12/01 13:31:48 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -398,10 +398,11 @@
/* MSI-X */
counts[PCI_INTR_TYPE_MSIX] = uimin(pci_msix_count(pa->pa_pc, pa->pa_tag),
ncpu + 1);
- if (counts[PCI_INTR_TYPE_MSIX] < 2) {
+ if (counts[PCI_INTR_TYPE_MSIX] < 1) {
counts[PCI_INTR_TYPE_MSIX] = 0;
} else if (!nvme_pci_mq || !nvme_pci_mpsafe) {
- counts[PCI_INTR_TYPE_MSIX] = 2; /* adminq + 1 ioq */
+ if (counts[PCI_INTR_TYPE_MSI] > 2)
+ counts[PCI_INTR_TYPE_MSIX] = 2; /* adminq + 1 ioq */
}
/* MSI */
Home |
Main Index |
Thread Index |
Old Index