Author: sephe
Date: Mon May 30 06:49:01 2016
New Revision: 300985
URL: https://svnweb.freebsd.org/changeset/base/300985

Log:
  bge: Support 5717 C0, which is almost same as 5720 A0
  
  PR:           209758
  Obtained from:        DragonFlyBSD d79f5d8f5fe94cd6769207b2901422977d502bc0
  MFC after:    1 week

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c   Mon May 30 06:44:10 2016        (r300984)
+++ head/sys/dev/bge/if_bge.c   Mon May 30 06:49:01 2016        (r300985)
@@ -171,6 +171,7 @@ static const struct bge_type {
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5715 },
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5715S },
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5717 },
+       { BCOM_VENDORID,        BCOM_DEVICEID_BCM5717C },
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5718 },
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5719 },
        { BCOM_VENDORID,        BCOM_DEVICEID_BCM5720 },
@@ -311,6 +312,7 @@ static const struct bge_revision {
        { BGE_CHIPID_BCM5715_A3,        "BCM5715 A3" },
        { BGE_CHIPID_BCM5717_A0,        "BCM5717 A0" },
        { BGE_CHIPID_BCM5717_B0,        "BCM5717 B0" },
+       { BGE_CHIPID_BCM5717_C0,        "BCM5717 C0" },
        { BGE_CHIPID_BCM5719_A0,        "BCM5719 A0" },
        { BGE_CHIPID_BCM5720_A0,        "BCM5720 A0" },
        { BGE_CHIPID_BCM5755_A0,        "BCM5755 A0" },
@@ -2699,6 +2701,7 @@ bge_chipid(device_t dev)
                 */
                switch (pci_get_device(dev)) {
                case BCOM_DEVICEID_BCM5717:
+               case BCOM_DEVICEID_BCM5717C:
                case BCOM_DEVICEID_BCM5718:
                case BCOM_DEVICEID_BCM5719:
                case BCOM_DEVICEID_BCM5720:
@@ -2727,6 +2730,8 @@ bge_chipid(device_t dev)
                default:
                        id = pci_read_config(dev, BGE_PCI_PRODID_ASICREV, 4);
                }
+               if (id == BGE_CHIPID_BCM5717_C0)
+                       id = BGE_CHIPID_BCM5720_A0;
        }
        return (id);
 }

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h        Mon May 30 06:44:10 2016        
(r300984)
+++ head/sys/dev/bge/if_bgereg.h        Mon May 30 06:49:01 2016        
(r300985)
@@ -329,6 +329,7 @@
 #define        BGE_CHIPID_BCM57780_A1          0x57780001
 #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_BCM5762_A0           0x05762000
@@ -2452,6 +2453,7 @@ struct bge_status_block {
 #define        BCOM_DEVICEID_BCM5715           0x1678
 #define        BCOM_DEVICEID_BCM5715S          0x1679
 #define        BCOM_DEVICEID_BCM5717           0x1655
+#define        BCOM_DEVICEID_BCM5717C          0x1665
 #define        BCOM_DEVICEID_BCM5718           0x1656
 #define        BCOM_DEVICEID_BCM5719           0x1657
 #define        BCOM_DEVICEID_BCM5720_PP        0x1658  /* Not released to 
public. */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to