Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch make pci_intr_alloc() try also MSI-X by default (wi...
details: https://anonhg.NetBSD.org/src/rev/f59b43df4d25
branches: trunk
changeset: 994910:f59b43df4d25
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Nov 27 20:08:05 2018 +0000
description:
make pci_intr_alloc() try also MSI-X by default (with NULL count);
there are boards/emulators which only have MSI-X and no MSI, and
so far there is no evidence there are devices which support both
and don't work in MSI-X mode
this change is supposed to reduce amount of needed cut&paste code in drivers
discussed briefly with jmcneill@
diffstat:
sys/arch/arm/pci/pci_msi_machdep.c | 6 +++---
sys/arch/x86/pci/pci_intr_machdep.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 3af5f2cb2ee0 -r f59b43df4d25 sys/arch/arm/pci/pci_msi_machdep.c
--- a/sys/arch/arm/pci/pci_msi_machdep.c Tue Nov 27 19:17:02 2018 +0000
+++ b/sys/arch/arm/pci/pci_msi_machdep.c Tue Nov 27 20:08:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_msi_machdep.c,v 1.3 2018/11/16 15:06:22 jmcneill Exp $ */
+/* $NetBSD: pci_msi_machdep.c,v 1.4 2018/11/27 20:08:05 jdolecek Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.3 2018/11/16 15:06:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.4 2018/11/27 20:08:05 jdolecek Exp $");
#include <sys/kernel.h>
#include <sys/kmem.h>
@@ -188,7 +188,7 @@
error = EINVAL;
intx_count = 1;
msi_count = 1;
- msix_count = 0;
+ msix_count = 1;
if (counts != NULL) {
switch (max_type) {
diff -r 3af5f2cb2ee0 -r f59b43df4d25 sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c Tue Nov 27 19:17:02 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c Tue Nov 27 20:08:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_intr_machdep.c,v 1.45 2018/09/23 02:51:06 cherry Exp $ */
+/* $NetBSD: pci_intr_machdep.c,v 1.46 2018/11/27 20:08:05 jdolecek Exp $ */
/*-
* Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.45 2018/09/23 02:51:06 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.46 2018/11/27 20:08:05 jdolecek Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -514,6 +514,7 @@
intx_count = msi_count = msix_count = 0;
if (counts == NULL) { /* simple pattern */
+ msix_count = 1;
msi_count = 1;
intx_count = 1;
} else {
Home |
Main Index |
Thread Index |
Old Index