Subject: Re: Gigabit Ethernet support on gmac?
To: None <thorpej@wasabisystems.com>
From: Monroe Williams <monroe@criticalpath.com>
List: port-macppc
Date: 10/18/2001 15:33:36
on 10/18/01 1:23 PM, Jason R Thorpe at thorpej@wasabisystems.com wrote:

> On Thu, Oct 18, 2001 at 11:43:14AM -0700, Monroe Williams wrote:
>> With a kernel that generates this dmesg output:
>> 
>> gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01)
>> gem0: interrupting at irq 41
>> gem0: Ethernet address 00:30:65:d6:f3:de
>> brgphy0 at gem0 phy 0: BCM5401 1000BASE-T media interface, rev. 3
>> brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
>> 1000baseT-FDX, auto
>> 
>> If I boot the machine while connected to a 100baseTX switch, it doesn't
>> autodetect.  (ifconfig shows "media: Ethernet autoselect (none)".)  I can
>> get connectivity by doing `ifconfig gem0 media 100baseTX-FDX`.  If I then
>> set the media back to autoselect, it seems to work fine thereafter.  I can
>> hot-plug the cable as needed, the ifconfig output reflects the state of the
>> world, and the interface works as expected.
> 
> Ok, I suppose this means that the behavior you're observing is different
> from that of the "gm" driver.

That's correct.  Sorry I wasn't clearer on this.  The gm driver _does_
autodetect correctly at boot time.  The gem driver doesn't, even if
/etc/ifconfig.gem0 contains an explicit "media autodetect".

I can work around the autodetect-at-boot problem with a multi-line
/etc/ifconfig.gem0 like this:

---
xxx.xxx.xxx.xxx netmask 255.255.255.0
media 100baseTX-FDX
media auto
---

> The MII/PHY setup in the "gem" driver is
> a bit different -- I'll poke around and see if I can find anything
> suspicious.
>
>> I can't get gigabit to work at all.  If I hot-plug the cable into the
>> gigabit switch, the link lights show a 1G link and ifconfig shows
>> 
>> media: Ethernet autoselect (1000baseTX full-duplex)
>> 
>> but no packets flow.  I've tried various manual media configurations with no
>> joy.  Booting the machine while connected to the gigabit switch works no
>> better.
> 
> Ok ... this means there's probably some MAC setup missing for Gig-E speeds.
> I'll take a look into this, too.

Just to be clear: Gigabit never worked for me with the gm driver either --
that's part of the reason I was hoping to get the gem driver working.

>> The results are mostly the same, but when it's plugged into the Gigabit
>> switch in autoconfig mode, ifconfig shows:
>> 
>> media: Ethernet autoselect (100baseTX full-duplex)
>> 
>> which doesn't match what the lights on the switch show (1G link).
> 
> Right, because ukphy doesn't know how to figure out what the Gig-E
> media is ... I should be able to fix this, too.

Cool.

-- monroe
------------------------------------------------------------------------
Monroe Williams                                  monroe@criticalpath.com