summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2006-06-28 09:12:29 +0000
committerglebius <glebius@FreeBSD.org>2006-06-28 09:12:29 +0000
commit752a9a7e28c70b5935908ab4b6ca0eaca88de6eb (patch)
tree7f86ff7fff29b2ea2b515b0e1814d6b6794b08b0 /sys/dev/bge
parentd2142779331d06b574cd72888ca940d8d5de1b9a (diff)
downloadFreeBSD-src-752a9a7e28c70b5935908ab4b6ca0eaca88de6eb.zip
FreeBSD-src-752a9a7e28c70b5935908ab4b6ca0eaca88de6eb.tar.gz
- Recognize more device IDs adding support for BCM5754, BCM5755,
BCM5787 based NICs. - Recognize BCM5703 B0 ASIC. - Rewrite the jumbo capability matching macro, so that chips known to work are listed there. [*] [*] I'm still not sure about this. Probably more corrections will be done to this macro after discussion with davidch@ and brad@OpenBSD. Obtained from: OpenBSD (brad)
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c68
-rw-r--r--sys/dev/bge/if_bgereg.h10
2 files changed, 44 insertions, 34 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 7802e61..9da9a4c 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -171,10 +171,17 @@ static struct bge_type {
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5753 },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5753F },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5753M },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5754 },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5754M },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5755 },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5755M },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5780 },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5780S },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5781 },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5782 },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5786 },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5787 },
+ { BCOM_VENDORID, BCOM_DEVICEID_BCM5787M },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5788 },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5789 },
{ BCOM_VENDORID, BCOM_DEVICEID_BCM5901 },
@@ -223,6 +230,7 @@ static const struct bge_revision {
{ BGE_CHIPID_BCM5703_A1, "BCM5703 A1" },
{ BGE_CHIPID_BCM5703_A2, "BCM5703 A2" },
{ BGE_CHIPID_BCM5703_A3, "BCM5703 A3" },
+ { BGE_CHIPID_BCM5703_B0, "BCM5703 B0" },
{ BGE_CHIPID_BCM5704_A0, "BCM5704 A0" },
{ BGE_CHIPID_BCM5704_A1, "BCM5704 A1" },
{ BGE_CHIPID_BCM5704_A2, "BCM5704 A2" },
@@ -256,35 +264,18 @@ static const struct bge_revision {
* that we don't know about have a shot at working.
*/
static const struct bge_revision bge_majorrevs[] = {
- { BGE_ASICREV_BCM5700,
- "unknown BCM5700" },
-
- { BGE_ASICREV_BCM5701,
- "unknown BCM5701" },
-
- { BGE_ASICREV_BCM5703,
- "unknown BCM5703" },
-
- { BGE_ASICREV_BCM5704,
- "unknown BCM5704" },
-
- { BGE_ASICREV_BCM5705,
- "unknown BCM5705" },
-
- { BGE_ASICREV_BCM5750,
- "unknown BCM5750" },
-
- { BGE_ASICREV_BCM5714_A0,
- "unknown BCM5714" },
-
- { BGE_ASICREV_BCM5752,
- "unknown BCM5752" },
-
- { BGE_ASICREV_BCM5780,
- "unknown BCM5780" },
-
- { BGE_ASICREV_BCM5714,
- "unknown BCM5714" },
+ { BGE_ASICREV_BCM5700, "unknown BCM5700" },
+ { BGE_ASICREV_BCM5701, "unknown BCM5701" },
+ { BGE_ASICREV_BCM5703, "unknown BCM5703" },
+ { BGE_ASICREV_BCM5704, "unknown BCM5704" },
+ { BGE_ASICREV_BCM5705, "unknown BCM5705" },
+ { BGE_ASICREV_BCM5750, "unknown BCM5750" },
+ { BGE_ASICREV_BCM5714_A0, "unknown BCM5714" },
+ { BGE_ASICREV_BCM5752, "unknown BCM5752" },
+ { BGE_ASICREV_BCM5780, "unknown BCM5780" },
+ { BGE_ASICREV_BCM5714, "unknown BCM5714" },
+ { BGE_ASICREV_BCM5755, "unknown BCM5755" },
+ { BGE_ASICREV_BCM5787, "unknown BCM5787" },
{ 0, NULL }
};
@@ -295,23 +286,32 @@ static const struct bge_revision bge_majorrevs[] = {
(sc)->bge_asicrev == BGE_ASICREV_BCM5714_A0 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5780 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5714 || \
- (sc)->bge_asicrev == BGE_ASICREV_BCM5752)
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5752 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5755 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5787)
#define BGE_IS_575X_PLUS(sc) \
((sc)->bge_asicrev == BGE_ASICREV_BCM5750 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5714_A0 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5780 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5714 || \
- (sc)->bge_asicrev == BGE_ASICREV_BCM5752)
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5752 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5755 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5787)
#define BGE_IS_5714_FAMILY(sc) \
((sc)->bge_asicrev == BGE_ASICREV_BCM5714_A0 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5780 || \
(sc)->bge_asicrev == BGE_ASICREV_BCM5714)
-#define BGE_IS_JUMBO_CAPABLE(sc) \
- ((sc)->bge_asicrev != BGE_ASICREV_BCM5705 && \
- (sc)->bge_asicrev != BGE_ASICREV_BCM5750)
+#define BGE_IS_JUMBO_CAPABLE(sc) \
+ ((sc)->bge_asicrev == BGE_ASICREV_BCM5700 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5701 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5703 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5714 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5714_A0 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5780 || \
+ (sc)->bge_asicrev == BGE_ASICREV_BCM5704)
const struct bge_revision * bge_lookup_rev(uint32_t);
const struct bge_vendor * bge_lookup_vendor(uint16_t);
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 1d56ef5..40684c9 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -240,6 +240,7 @@
#define BGE_CHIPID_BCM5703_A1 0x10010000
#define BGE_CHIPID_BCM5703_A2 0x10020000
#define BGE_CHIPID_BCM5703_A3 0x10030000
+#define BGE_CHIPID_BCM5703_B0 0x11000000
#define BGE_CHIPID_BCM5704_A0 0x20000000
#define BGE_CHIPID_BCM5704_A1 0x20010000
#define BGE_CHIPID_BCM5704_A2 0x20020000
@@ -277,6 +278,8 @@
#define BGE_ASICREV_BCM5700 0x07
#define BGE_ASICREV_BCM5780 0x08
#define BGE_ASICREV_BCM5714 0x09
+#define BGE_ASICREV_BCM5755 0x0a
+#define BGE_ASICREV_BCM5787 0x0b
/* chip revisions */
#define BGE_CHIPREV(x) ((x) >> 24)
@@ -1989,10 +1992,17 @@ struct bge_status_block {
#define BCOM_DEVICEID_BCM5753 0x16F7
#define BCOM_DEVICEID_BCM5753F 0x16FE
#define BCOM_DEVICEID_BCM5753M 0x16FD
+#define BCOM_DEVICEID_BCM5754 0x167A
+#define BCOM_DEVICEID_BCM5754M 0x1672
+#define BCOM_DEVICEID_BCM5755 0x167B
+#define BCOM_DEVICEID_BCM5755M 0x1673
#define BCOM_DEVICEID_BCM5780 0x166A
#define BCOM_DEVICEID_BCM5780S 0x166B
#define BCOM_DEVICEID_BCM5781 0x16DD
#define BCOM_DEVICEID_BCM5782 0x1696
+#define BCOM_DEVICEID_BCM5786 0x169A
+#define BCOM_DEVICEID_BCM5787 0x169B
+#define BCOM_DEVICEID_BCM5787M 0x1693
#define BCOM_DEVICEID_BCM5788 0x169C
#define BCOM_DEVICEID_BCM5789 0x169D
#define BCOM_DEVICEID_BCM5901 0x170D
OpenPOWER on IntegriCloud