Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci actually allow pci_intr_alloc() with NULL c...
details: https://anonhg.NetBSD.org/src/rev/9ff92de9140a
branches: trunk
changeset: 446216:9ff92de9140a
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Nov 27 21:03:50 2018 +0000
description:
actually allow pci_intr_alloc() with NULL count with MSI-X
diffstat:
sys/arch/x86/pci/pci_intr_machdep.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 790f74b075f3 -r 9ff92de9140a sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c Tue Nov 27 20:13:43 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c Tue Nov 27 21:03:50 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_intr_machdep.c,v 1.46 2018/11/27 20:08:05 jdolecek Exp $ */
+/* $NetBSD: pci_intr_machdep.c,v 1.47 2018/11/27 21:03:50 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.46 2018/11/27 20:08:05 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.47 2018/11/27 21:03:50 jdolecek Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -543,9 +543,8 @@
if (msix_count > 0) {
error = pci_msix_alloc_exact(pa, ihps, msix_count);
if (error == 0) {
- KASSERTMSG(counts != NULL,
- "If MSI-X is used, counts must not be NULL.");
- counts[PCI_INTR_TYPE_MSIX] = msix_count;
+ if (counts != NULL)
+ counts[PCI_INTR_TYPE_MSIX] = msix_count;
goto out;
}
}
Home |
Main Index |
Thread Index |
Old Index