Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Simplify PCI device table. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/c588f9fbe760
branches:  trunk
changeset: 997061:c588f9fbe760
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Feb 20 08:03:58 2019 +0000

description:
Simplify PCI device table. No functional change.

diffstat:

 sys/dev/pci/if_bge.c |  466 ++++++++++----------------------------------------
 1 files changed, 99 insertions(+), 367 deletions(-)

diffs (truncated from 499 to 300 lines):

diff -r e608519a35a1 -r c588f9fbe760 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Wed Feb 20 07:47:34 2019 +0000
+++ b/sys/dev/pci/if_bge.c      Wed Feb 20 08:03:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.324 2019/02/20 04:49:08 msaitoh Exp $     */
+/*     $NetBSD: if_bge.c,v 1.325 2019/02/20 08:03:58 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.324 2019/02/20 04:49:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.325 2019/02/20 08:03:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -297,375 +297,107 @@
 #define        BGE_EVCNT_UPD(ev, val)  /* nothing */
 #endif
 
+#define VIDDID(a, b) PCI_VENDOR_ ## a, PCI_PRODUCT_ ## a ## _ ## b
+/*
+ * The BCM5700 documentation seems to indicate that the hardware still has the
+ * Alteon vendor ID burned into it, though it should always be overridden by
+ * the value in the EEPROM.  We'll check for it anyway.
+ */
 static const struct bge_product {
        pci_vendor_id_t         bp_vendor;
        pci_product_id_t        bp_product;
        const char              *bp_name;
 } bge_products[] = {
-       /*
-        * The BCM5700 documentation seems to indicate that the hardware
-        * still has the Alteon vendor ID burned into it, though it
-        * should always be overridden by the value in the EEPROM.  We'll
-        * check for it anyway.
-        */
-       { PCI_VENDOR_ALTEON,
-         PCI_PRODUCT_ALTEON_BCM5700,
-         "Broadcom BCM5700 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_ALTEON,
-         PCI_PRODUCT_ALTEON_BCM5701,
-         "Broadcom BCM5701 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_ALTIMA,
-         PCI_PRODUCT_ALTIMA_AC1000,
-         "Altima AC1000 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_ALTIMA,
-         PCI_PRODUCT_ALTIMA_AC1001,
-         "Altima AC1001 Gigabit Ethernet",
-          },
-       { PCI_VENDOR_ALTIMA,
-         PCI_PRODUCT_ALTIMA_AC1003,
-         "Altima AC1003 Gigabit Ethernet",
-          },
-       { PCI_VENDOR_ALTIMA,
-         PCI_PRODUCT_ALTIMA_AC9100,
-         "Altima AC9100 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_APPLE,
-         PCI_PRODUCT_APPLE_BCM5701,
-         "APPLE BCM5701 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5700,
-         "Broadcom BCM5700 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5701,
-         "Broadcom BCM5701 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5702,
-         "Broadcom BCM5702 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5702X,
-         "Broadcom BCM5702X Gigabit Ethernet" },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5703,
-         "Broadcom BCM5703 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5703X,
-         "Broadcom BCM5703X Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5703_ALT,
-         "Broadcom BCM5703 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5704C,
-         "Broadcom BCM5704C Dual Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5704S,
-         "Broadcom BCM5704S Dual Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5705,
-         "Broadcom BCM5705 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5705F,
-         "Broadcom BCM5705F Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5705K,
-         "Broadcom BCM5705K Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5705M,
-         "Broadcom BCM5705M Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5705M_ALT,
-         "Broadcom BCM5705M Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5714,
-         "Broadcom BCM5714 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5714S,
-         "Broadcom BCM5714S Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5715,
-         "Broadcom BCM5715 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5715S,
-         "Broadcom BCM5715S Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5717,
-         "Broadcom BCM5717 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5717C,
-         "Broadcom BCM5717 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5718,
-         "Broadcom BCM5718 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5719,
-         "Broadcom BCM5719 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5720,
-         "Broadcom BCM5720 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5721,
-         "Broadcom BCM5721 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5722,
-         "Broadcom BCM5722 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5723,
-         "Broadcom BCM5723 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5750,
-         "Broadcom BCM5750 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5751,
-         "Broadcom BCM5751 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5751F,
-         "Broadcom BCM5751F Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5751M,
-         "Broadcom BCM5751M Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5752,
-         "Broadcom BCM5752 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5752M,
-         "Broadcom BCM5752M Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5753,
-         "Broadcom BCM5753 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5753F,
-         "Broadcom BCM5753F Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5753M,
-         "Broadcom BCM5753M Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5754,
-         "Broadcom BCM5754 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5754M,
-         "Broadcom BCM5754M Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5755,
-         "Broadcom BCM5755 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5755M,
-         "Broadcom BCM5755M Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5756,
-         "Broadcom BCM5756 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5761,
-         "Broadcom BCM5761 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5761E,
-         "Broadcom BCM5761E Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5761S,
-         "Broadcom BCM5761S Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5761SE,
-         "Broadcom BCM5761SE Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5764,
-         "Broadcom BCM5764 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5780,
-         "Broadcom BCM5780 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5780S,
-         "Broadcom BCM5780S Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5781,
-         "Broadcom BCM5781 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5782,
-         "Broadcom BCM5782 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5784M,
-         "BCM5784M NetLink 1000baseT Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5785F,
-         "BCM5785F NetLink 10/100 Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5785G,
-         "BCM5785G NetLink 1000baseT Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5786,
-         "Broadcom BCM5786 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5787,
-         "Broadcom BCM5787 Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5787F,
-         "Broadcom BCM5787F 10/100 Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5787M,
-         "Broadcom BCM5787M Gigabit Ethernet",
-       },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5788,
-         "Broadcom BCM5788 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5789,
-         "Broadcom BCM5789 Gigabit Ethernet",
-         },
-       { PCI_VENDOR_BROADCOM,
-         PCI_PRODUCT_BROADCOM_BCM5901,



Home | Main Index | Thread Index | Old Index