summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-12-08 01:00:48 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-12-08 01:00:48 +0000
commit06c6b7d9da841865962e5d6cb683d4b902b55f8e (patch)
tree80b4e8bb79b86c84c211b489d51fede532452bd1
parentfcd98df53c55d7f5a9a81693893e7bbcaab8d348 (diff)
add BCM5903M PCI id and recognize BCM5714 and BCM5715 ASICs.
From Broadcom's Linux driver
-rw-r--r--sys/dev/pci/if_bge.c45
-rw-r--r--sys/dev/pci/if_bgereg.h7
2 files changed, 38 insertions, 14 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 004a4d89619..9107712552f 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.107 2005/11/29 20:35:58 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.108 2005/12/08 01:00:46 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -244,6 +244,7 @@ const struct pci_matchid bge_devices[] = {
{ PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5789 },
{ PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5901 },
{ PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5901A2 },
+ { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5903M },
{ PCI_VENDOR_SCHNEIDERKOCH, PCI_PRODUCT_SCHNEIDERKOCH_SK9D21 },
@@ -266,24 +267,32 @@ const struct pci_matchid bge_devices[] = {
#define BGE_IS_5705_OR_BEYOND(sc) \
- (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5705 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5750 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5705 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5750 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714_A0 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714 || \
BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5752)
#define BGE_IS_575X_PLUS(sc) \
- (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5750 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5750 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_AISCREV_BCM5714_A0 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714 || \
BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5752)
#define BGE_IS_5714_FAMILY(sc) \
- (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780)
+ (BGE_ASICREV(sc->bge_chipid) == BGE_AISCREV_BCM5714_A0 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_AISCREV_BCM5714)
#define BGE_IS_JUMBO_CAPABLE(sc) \
- (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5700 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5701 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5703 || \
- BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5700 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5701 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5703 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714_A0 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5780 || \
+ BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714 || \
BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704)
@@ -429,6 +438,14 @@ static const struct bge_revision {
BGE_QUIRK_ONLY_PHY_1,
"BCM5752 A1" },
+ { BGE_CHIPID_BCM5715_A0,
+ BGE_QUIRK_ONLY_PHY_1,
+ "BCM5715 A0" },
+
+ { BGE_CHIPID_BCM5715_A1,
+ BGE_QUIRK_ONLY_PHY_1,
+ "BCM5715 A1" },
+
{ 0, 0, NULL }
};
@@ -461,7 +478,7 @@ static const struct bge_revision bge_majorrevs[] = {
BGE_QUIRK_ONLY_PHY_1,
"unknown BCM5750" },
- { BGE_ASICREV_BCM5714,
+ { BGE_ASICREV_BCM5714_A0,
BGE_QUIRK_ONLY_PHY_1,
"unknown BCM5714" },
@@ -473,6 +490,10 @@ static const struct bge_revision bge_majorrevs[] = {
BGE_QUIRK_ONLY_PHY_1,
"unknown BCM5780" },
+ { BGE_ASICREV_BCM5714,
+ BGE_QUIRK_ONLY_PHY_1,
+ "unknown BCM5714" },
+
{ 0,
0,
NULL }
diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h
index e5d29ffbf0d..d13dfd9df73 100644
--- a/sys/dev/pci/if_bgereg.h
+++ b/sys/dev/pci/if_bgereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bgereg.h,v 1.33 2005/11/27 00:26:36 brad Exp $ */
+/* $OpenBSD: if_bgereg.h,v 1.34 2005/12/08 01:00:47 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -260,6 +260,8 @@
#define BGE_CHIPID_BCM5752_A0 0x60000000
#define BGE_CHIPID_BCM5752_A1 0x60010000
#define BGE_CHIPID_BCM5714 0x80000000
+#define BGE_CHIPID_BCM5715_A0 0x90000000
+#define BGE_CHIPID_BCM5715_A1 0x90010000
/* shorthand one */
#define BGE_ASICREV(x) ((x) >> 28)
@@ -269,9 +271,10 @@
#define BGE_ASICREV_BCM5704 0x02
#define BGE_ASICREV_BCM5705 0x03
#define BGE_ASICREV_BCM5750 0x04
-#define BGE_ASICREV_BCM5714 0x05 /* 5714, 5715 */
+#define BGE_ASICREV_BCM5714_A0 0x05 /* 5714, 5715 */
#define BGE_ASICREV_BCM5752 0x06
#define BGE_ASICREV_BCM5780 0x08
+#define BGE_ASICREV_BCM5714 0x09 /* 5714, 5715 */
/* chip revisions */
#define BGE_CHIPREV(x) ((x) >> 24)