bnx: Support 5717 C0, which is almost same as 5720 A0
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 16 Feb 2013 13:02:01 +0000 (21:02 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 16 Feb 2013 13:02:53 +0000 (21:02 +0800)
Obtained-from: tg3

sys/dev/netif/bge/if_bgereg.h
sys/dev/netif/bnx/if_bnx.c

index 175aca1..8dc7034 100644 (file)
 #define BGE_CHIPID_BCM5906_A2          0xc002
 #define BGE_CHIPID_BCM57780_A0         0x57780000
 #define BGE_CHIPID_BCM57780_A1         0x57780001
-#define BGE_CHIPID_BCM5717_A0          0x5717000
-#define BGE_CHIPID_BCM5717_B0          0x5717100
-#define BGE_CHIPID_BCM5719_A0          0x5719000
+#define BGE_CHIPID_BCM5717_A0          0x05717000
+#define BGE_CHIPID_BCM5717_B0          0x05717100
+#define BGE_CHIPID_BCM5717_C0          0x05717200
+#define BGE_CHIPID_BCM5719_A0          0x05719000
 #define BGE_CHIPID_BCM5720_A0          0x05720000
 #define BGE_CHIPID_BCM57765_A0         0x57785000
 #define BGE_CHIPID_BCM57765_B0         0x57785100
index 91eebed..dca4428 100644 (file)
@@ -90,6 +90,8 @@ static const struct bnx_type {
 } bnx_devs[] = {
        { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5717,
                "Broadcom BCM5717 Gigabit Ethernet" },
+       { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5717C,
+               "Broadcom BCM5717C Gigabit Ethernet" },
        { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5718,
                "Broadcom BCM5718 Gigabit Ethernet" },
        { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5719,
@@ -1815,6 +1817,7 @@ bnx_attach(device_t dev)
 
                switch (product) {
                case PCI_PRODUCT_BROADCOM_BCM5717:
+               case PCI_PRODUCT_BROADCOM_BCM5717C:
                case PCI_PRODUCT_BROADCOM_BCM5718:
                case PCI_PRODUCT_BROADCOM_BCM5719:
                case PCI_PRODUCT_BROADCOM_BCM5720_ALT:
@@ -1842,6 +1845,9 @@ bnx_attach(device_t dev)
                        break;
                }
        }
+       if (sc->bnx_chipid == BGE_CHIPID_BCM5717_C0)
+               sc->bnx_chipid = BGE_CHIPID_BCM5720_A0;
+
        sc->bnx_asicrev = BGE_ASICREV(sc->bnx_chipid);
        sc->bnx_chiprev = BGE_CHIPREV(sc->bnx_chipid);