Subject: Re: adding support for new PHY?
To: None <perry@piermont.com>
From: Johan A.van Zanten <johan@giantfoo.org>
List: netbsd-help
Date: 01/28/2007 21:29:58
> Johan A. van Zanten <johan@giantfoo.org> writes:
> >  I built a new kernel with:
> >
> >      rgephy* at mii? phy ?
> >  And it is recognized during the boot:
> >
> > re0 at pci0 dev 14 function 0: RealTek 8169S Single-chip Gigabit Ethernet
> > re0: interrupting at dec 6600 irq 35
> > re0: Ethernet address 00:e0:4c:77:79:80
> > re0: using 512 tx descriptors
> > rgephy0 at re0 phy 7: RTL8169S/8110S 1000BASE-T media interface, rev. 0
> >
> >  But i can't get it to work (via 'ifconfig re0 media 100baseTX mediaopt
> > full-duplex' for example) with the switch at anything other than 10baseT.

"Perry E. Metzger" <perry@piermont.com> wrote:
> 
> Generally speaking, gig e switches demand that you autonegotiate. Try
> it again with autonegotiation instead of nailing it.

 If i set the switch to "auto" and do:

  ifconfig re0 media autoselect

...then i get 10 Mbps half-duplex.

I even rebooted the machine to see.  Without me issuing any (manual)
ifconfig commands, here's what the interface looks like:

sarasvati:/root # ifconfig re0
re0: flags=8a02<BROADCAST,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        capabilities=87<IP4CSUM,TCP4CSUM,UDP4CSUM,TSO4>
        enabled=0
        address: 00:e0:4c:77:79:80
        media: Ethernet autoselect (10baseT)
        status: active

FYI, none of the professional networking people i've worked with in the
last 10 years use autonegotiate -- they always hard-wire the ports.
Typically they are working with Cisco stuff, and these are very large
shops.  This is a Netgear switch in my own little machine room with about
10 machines, mostly NetBSD, so it's a difference setup.  But the last time
i power-cycled my Netgear GS724T, it failed to auto-negotiate with all of
the (already up) 100 Mpbs devices, except another Netgear switch.  In
otherwords, "auto" worked if the switch was up when the NetBSD machines
(alphas and one PC) first configured their 100 Mbps interfaces, but not if
the hosts were already up and the switch was rebooted.

 -johan