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 Recognize more rdc devices (Andrius V.)
details: https://anonhg.NetBSD.org/src/rev/dcf555a6d3b5
branches: trunk
changeset: 970938:dcf555a6d3b5
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 07 12:42:11 2020 +0000
description:
Recognize more rdc devices (Andrius V.)
diffstat:
sys/arch/x86/pci/rdcpcib.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 33a1177e8be4 -r dcf555a6d3b5 sys/arch/x86/pci/rdcpcib.c
--- a/sys/arch/x86/pci/rdcpcib.c Tue Apr 07 12:32:02 2020 +0000
+++ b/sys/arch/x86/pci/rdcpcib.c Tue Apr 07 12:42:11 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.3 2020/04/07 12:42:11 christos 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.3 2020/04/07 12:42:11 christos 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