Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jan 2003 05:29:56 +0000
From:      "George J.V. Cox" <gjvc@extremis.net>
To:        freebsd-hardware@freebsd.org, freebsd-net@freebsd.org
Subject:   SOLVED: Broadcom BCM5703X Gigabit Ethernet woes
Message-ID:  <20030101052956.GA21888@beaujolais.extremis.net>

next in thread | raw e-mail | index | archive | help
On 24/12 14:20, George J.V. Cox wrote:

> I have a Dell 1655MC blade server. It's a chassis of 6 PCs in a 3U
> case. Each blade has two Broadcom BCM5703 interfaces. Unfortunately,
> its behaviour is rather non-deterministic.

Each blade has 2 BCM5703X chips. At least that's what it says on the
chips themselves. However, at boot time the PCI subsystem IDs appear
to match those of the BCM5702 chip. How confusing. What is even more
confusing is that there appear to be different revisons of the chipsets
in same set of 3 blades we received from Dell. This is also noticable
by one of the blades having MAC addresses which differ in the first 3
octets.

The 1655MC has an internal switch unit, which has 4 100Mb uplink ports
to the outside world and six downlink ports to the blade servers. The
downlink ports are fixed at 1000baseSX in the switch configuration
and this cannot be changed. Hence, enabling the ten bit interface and
forcing 1000baseSX mode on the host interfaces is the way to go. No MII
bus probing is performed by the kernel and everything is peachy. Cursory
testing shows that TCP transfer rates of about 50 Mbyte/second are 
possible between hosts in the same chassis.  (The only tuning was to
set the net.inet.tcp.sendspace and net.inet.tcp.recvspace sysctls to 100Kb)

Here's some dmesg output when the patch below is applied:

bge0: <Broadcom BCM5703X Gigabit Ethernet> mem 0xed010000-0xed01ffff irq 7 at device 10.0 on pci1
bge0: Ethernet address: 00:06:5b:0e:6d:1c
bge0: PCI subsystem ID is 0x00001646
bge1: <Broadcom BCM5703X Gigabit Ethernet> mem 0xed000000-0xed00ffff irq 10 at device 11.0 on pci1
bge1: Ethernet address: 00:06:5b:0e:6d:1d
bge1: PCI subsystem ID is 0x00001646

Values of 0x0126 and 0x0124 have also been seen.  As I mentioned above, no
MII probing is performed.

# ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3<rxcsum,txcsum>
        inet 10.2.10.51 netmask 0xffff0000 broadcast 10.2.255.255
        ether 00:06:5b:0e:6d:1c
        media: Ethernet 1000baseSX <full-duplex>
        status: active

The media type and options need not be forcibly set to 1000baseSX and
full-duplex respectively, as they have been above.

Here is my patch against -STABLE which fixes the problem. Resolving the
BCOM_SUBSYSID_UNKNOWN_* IDs to some sensible names is left as an exercise
for the reader. :-)  The original PR is i386/46484.

best;


gjvc

--- if_bge.c.orig	Tue Dec 31 01:21:41 2002
+++ if_bge.c	Wed Jan  1 04:51:08 2003
@@ -1519,7 +1519,7 @@
 	u_int32_t command;
 	struct ifnet *ifp;
 	struct bge_softc *sc;
-	u_int32_t hwcfg = 0;
+	u_int32_t hwcfg = 0, pcissid = 0;
 	u_int32_t mac_addr = 0;
 	int unit, error = 0, rid;
 
@@ -1701,9 +1701,19 @@
 	if ((ntohl(hwcfg) & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER)
 		sc->bge_tbi = 1;
 
-	/* The SysKonnect SK-9D41 is a 1000baseSX card. */
-	if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41)
-		sc->bge_tbi = 1;
+	/* check for 1000baseSX cards detectable via their PCI subsystem IDs */
+	pcissid = (pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16);
+	printf("bge%d: PCI subsystem ID is 0x%08x\n", sc->bge_unit, pcissid);
+
+	switch (pcissid) {
+		case SK_SUBSYSID_9D41:
+		case BCOM_SUBSYSID_UNKNOWN_0x0124:
+		case BCOM_SUBSYSID_UNKNOWN_0x0126:
+		case BCOM_SUBSYSID_UNKNOWN_0x1646:
+			printf("bge%d: 1000baseSX capable; enabling TBI\n", sc->bge_unit);
+			sc->bge_tbi = 1;
+		default:
+	}
 
 	if (sc->bge_tbi) {
 		ifmedia_init(&sc->bge_ifmedia, IFM_IMASK,
--- if_bgereg.h.orig	Sun Dec 29 10:50:06 2002
+++ if_bgereg.h	Wed Jan  1 04:50:56 2003
@@ -1787,6 +1787,10 @@
 #define BCOM_DEVICEID_BCM5702X		0x16A6
 #define BCOM_DEVICEID_BCM5703X		0x16A7
 
+#define BCOM_SUBSYSID_UNKNOWN_0x0124	0x0124
+#define BCOM_SUBSYSID_UNKNOWN_0x0126	0x0126
+#define BCOM_SUBSYSID_UNKNOWN_0x1646	0x1646
+
 /*
  * Alteon AceNIC PCI vendor/device ID.
  */

-- 
[gjvc]

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030101052956.GA21888>