Subject: Re: bge0 doesn't like to autodetect gigabit
To: Stephen Borrill <netbsd@precedence.co.uk>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 09/03/2003 09:39:59
In message <Pine.NEB.4.21.0309031100340.27049-100000@brio.precedence.co.uk>Stephen Borrill wr
ites
>On Tue, 2 Sep 2003, Jonathan Stone wrote:
>> In message <r02000100-1026-C3A32494DD2211D79B49000393D5E5DA@[10.0.1.30]>Bryan Vyhmeister w


>> What kind of bge? [...]


>5703. dmesg section is:
>
>bge0 at pci3 dev 4 function 0: Broadcom BCM5703X Gigabit Ethernet
>bge0: interrupting at irq 7
>bge0: ASIC BCM5703 A2, Ethernet address 00:02:55:b7:79:0d
>brgphy0 at bge0 phy 1: BCM5703 1000BASE-T media interface, rev. 2
>bge1 at pci3 dev 5 function 0: Broadcom BCM5703X Gigabit Ethernet
>bge1: interrupting at irq 5
>bge1: ASIC BCM5703 A2, Ethernet address 00:02:55:b7:79:0e
>brgphy1 at bge1 phy 1: BCM5703 1000BASE-T media interface, rev. 2
>
>See above.

How embarassing. I had an EMCOFFEE moment there yesterday.
(and I was so close with the "no dsp phy patch", too).

You should edit sys/dev/mii/brgphy.c, remove the 

	#ifdef notyet /* unverified, untested */

around line 220 in -current, and the matching #endif, recompile,
reboot, and see whether that helps.  The kernel should then print a
messaage that it is "using the bcm5703 DSP patch". If that works, the
change should be committed, and pulled up to the 1.6 branch.

If your brgphy.c on the 1.6 branch doesn't have the #ifdef/#endif,
it'll have to be backported from -current. You'll need:

	bcm_5703_load_dspcode()
	brgphy_5703_reset()
	const struct mii_phy_funcs brgphy_5703_funcs {}

and any machinery they use which isn't already in the 1.6 branch.