From owner-freebsd-hackers Wed Jan 30 11:42:36 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id DA8BA37B405 for ; Wed, 30 Jan 2002 11:42:28 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g0UJf9M11952; Wed, 30 Jan 2002 11:41:09 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id g0UJf5204291; Wed, 30 Jan 2002 11:41:05 -0800 (PST) (envelope-from jdp) Date: Wed, 30 Jan 2002 11:41:05 -0800 (PST) Message-Id: <200201301941.g0UJf5204291@vashon.polstra.com> To: hackers@freebsd.org From: John Polstra Cc: jonathan@DSG.Stanford.EDU Subject: Re: Broadcom 5701 (3com 3c996B-T) phy support in 4.5? In-Reply-To: <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU> References: <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU>, Jonathan Stone wrote: > > Apologies if this is the wrong place to ask this.... > > I just got a 3com 3c996B-T with a bcm5701 chip. It doesn't work with a > kernel built from 4.5-RC source pulled Friday: the gigabit phy goes > unrecognized, gets attached as a ukphy, which (obviously) doesn't > support 1000baseTX. > > Is this expected to work? Its hard to tell from if_bge. > > > I discovered a suitable value for lines for sys/dev/mii/miidevs > in the Debian Linux driver: > > +model xxBROADCOM BCM5701 0x0011 BCM5701 10/100/1000baseTX PHY > > > rebuilt the .h file, and added corresponding lines to the probe > routine in bgrphy.c. That gets the builtin 5400-compatible gigabit > PHY recognized -- it auto-negotiates with my gigabit switch, and gives > the same ttcp same speed as a 5700-- but i still get another 30-odd > ukphy devices attached on that miibus instance. Yep, I went through the same exercise. Apparently the 5701 doesn't bother to decode the phy address. The driver just has to know to use phy number 1. (Boo, hiss!) I worked around it by making bge_miibus_readreg and bge_miibus_writereg return 0 if the device is a 5701 and the phy number isn't 1. That way, the extra phys never get probed. With that change, it works except that I'm getting frequent bogus "bge0: gigabit link up" messages. I haven't been able to figure out why yet. They don't appear to affect packet flow at all. > From investigating the Linux driver, I gather there are a few features > in these chips which may need workarounds (e.g., the Debian driver > includes a new firmware image for some 5701 revs'; and forces master > mode in some revs, to avoid a CRC bug. Caveat emptor.) Yes, there are quite a few mysterious workarounds in that driver. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message