Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 11:41:05 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        jonathan@DSG.Stanford.EDU
Subject:   Re: Broadcom  5701 (3com 3c996B-T) phy support in 4.5?
Message-ID:  <200201301941.g0UJf5204291@vashon.polstra.com>
In-Reply-To: <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU>
References:  <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <200201300133.RAA10055@Pescadero.DSG.Stanford.EDU>,
Jonathan Stone  <jonathan@DSG.Stanford.EDU> 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




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