Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/x86/pci Additionaly pull up the following revisi...



details:   https://anonhg.NetBSD.org/src/rev/d217003ee4e6
branches:  netbsd-9
changeset: 935880:d217003ee4e6
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jul 12 11:40:58 2020 +0000

description:
Additionaly pull up the following revisions for ticket #998 to unbreak
the build:

        sys/arch/x86/pci/rdcpcib.c              1.3

Recognize more RDC devices.

diffstat:

 sys/arch/x86/pci/rdcpcib.c |  21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r a66be3903ff6 -r d217003ee4e6 sys/arch/x86/pci/rdcpcib.c
--- a/sys/arch/x86/pci/rdcpcib.c        Fri Jul 10 11:59:10 2020 +0000
+++ b/sys/arch/x86/pci/rdcpcib.c        Sun Jul 12 11:40:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rdcpcib.c,v 1.2 2011/07/01 18:22:08 dyoung Exp $       */
+/*     $NetBSD: rdcpcib.c,v 1.2.58.1 2020/07/12 11:40:58 martin Exp $  */
 
 /*
  * Copyright (c) 2011 Manuel Bouyer.
@@ -31,7 +31,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rdcpcib.c,v 1.2 2011/07/01 18:22:08 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rdcpcib.c,v 1.2.58.1 2020/07/12 11:40:58 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -88,6 +88,17 @@
     rdcpcibmatch, rdcpcibattach, rdcpcibdetach, NULL,
     pcibrescan, pcibchilddet);
 
+
+static const struct rdcpcib_device {
+       pcireg_t vendor, product;
+} rdcpcib_devices[] = {
+       { PCI_VENDOR_RDC, PCI_PRODUCT_RDC_R6011_PCIB},
+       { PCI_VENDOR_RDC, PCI_PRODUCT_RDC_R6013_PCIB},
+       { PCI_VENDOR_RDC, PCI_PRODUCT_RDC_R6031_PCIB},
+       { PCI_VENDOR_RDC, PCI_PRODUCT_RDC_R6035_PCIB},
+       { PCI_VENDOR_RDC, PCI_PRODUCT_RDC_R6036_PCIB},
+};
+
 static int
 rdcpcibmatch(device_t parent, cfdata_t match, void *aux)
 {
@@ -97,9 +108,11 @@
            PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_BRIDGE_ISA)
                return 0;
 
-       if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_RDC &&
-           PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_RDC_PCIB)
+       for (size_t i = 0; i < __arraycount(rdcpcib_devices); i++) {
+               if (PCI_VENDOR(pa->pa_id) == rdcpcib_devices[i].vendor &&
+                   PCI_PRODUCT(pa->pa_id) == rdcpcib_devices[i].product)
                        return 10;
+       }
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index