Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/arch/arm/pci Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/9e981c34c6ce
branches:  netbsd-9
changeset: 453089:9e981c34c6ce
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Aug 04 19:25:48 2019 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #18):

        sys/arch/arm/pci/pci_msi_machdep.c: revision 1.7

Properly honour max_type arg to pci_intr_alloc

diffstat:

 sys/arch/arm/pci/pci_msi_machdep.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r ceef56a58bdd -r 9e981c34c6ce sys/arch/arm/pci/pci_msi_machdep.c
--- a/sys/arch/arm/pci/pci_msi_machdep.c        Sun Aug 04 19:24:18 2019 +0000
+++ b/sys/arch/arm/pci/pci_msi_machdep.c        Sun Aug 04 19:25:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_msi_machdep.c,v 1.6 2019/07/25 00:42:43 jmcneill Exp $ */
+/* $NetBSD: pci_msi_machdep.c,v 1.6.2.1 2019/08/04 19:25:48 martin 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.6 2019/07/25 00:42:43 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.6.2.1 2019/08/04 19:25:48 martin Exp $");
 
 #include <sys/kernel.h>
 #include <sys/kmem.h>
@@ -186,11 +186,10 @@
        int intx_count, msi_count, msix_count, error;
 
        error = EINVAL;
-       intx_count = 1;
-       msi_count = 1;
-       msix_count = 1;
 
        if (counts != NULL) {
+               intx_count = msi_count = msix_count = 0;
+
                switch (max_type) {
                case PCI_INTR_TYPE_MSIX:
                        msix_count = counts[PCI_INTR_TYPE_MSIX];
@@ -207,6 +206,8 @@
                        return EINVAL;
                }
                memset(counts, 0, sizeof(*counts) * PCI_INTR_TYPE_SIZE);
+       } else {
+               intx_count = msi_count = msix_count = 1;
        }
 
        if (msix_count == -1)



Home | Main Index | Thread Index | Old Index