Subject: Re: network problem with netra t1 105
To: None <mux@qualys.com, port-sparc64@netbsd.org>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 10/17/2001 15:35:28
| matthew green wrote:
| >    
| >    | I have an UltraSparc box on which I can't get the network to work under
| >    | NetBSD.  It detects one card, with two PHYs on it.  I'm unable to get
| >    | even only one of the PHYs working.  Under solaris 8, I have two
| >    | distinct interfaces I can assign each an IP and each has its MAC
| >    | address.  Both interfaces are working perfectly.
| >    
| >    
| >    | hme0 at pci1 dev 1 function 1: address 08:00:20:f9:8c:7a
| >    | ukphy0 at hme0 phy 0: Generic IEEE 802.3u media interface
| >    | ukphy0: OUI 0x0006b8, model 0x000c, rev. 1
| >    | ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
| >    | ukphy1 at hme0 phy 1: Generic IEEE 802.3u media interface
| >    | ukphy1: OUI 0x0006b8, model 0x000c, rev. 1
| >    | ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
| >    
| >    What does `ifconfig -a' print out?
| > 
| hme0: flags=8a63<UP,BROADCAST,NOTRAILERS,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
|         address: 08:00:20:f9:8c:7a
|         media: Ethernet autoselect (100baseTX full-duplex)
|         status: active
|         inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
|         inet6 fe80::a00:20ff:fef9:8c7a%hme0 prefixlen 64 scopeid 0x1

Hm.  Interseting.  ifconfig only prints out the status of one medium.

| lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33184
|         inet 127.0.0.1 netmask 0xff000000
|         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
|         inet6 ::1 prefixlen 128
| sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
| sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
| ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
| ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
| strip0: flags=0<> mtu 1100
| tun0: flags=10<POINTOPOINT> mtu 1500
| tun1: flags=10<POINTOPOINT> mtu 1500
| tun2: flags=10<POINTOPOINT> mtu 1500
| tun3: flags=10<POINTOPOINT> mtu 1500
| eon0: flags=3<UP,BROADCAST> mtu 1500
|         address: 00:00:00:00:00
|
| As you can see, if I don't specify an instance with ifconfig, it
| apparently negotiates successfully the link.  However, if I plug the
| cable on link1 and try to use instance 1, it always says "status: no
| carrier".

Yes, that's pretty much what I expected.

I think what's happening is that the hme has two separate media interfaces,
only one of which can be in use at a time.  A bit needs to be set to
select between the two of them, and that bit is set based on a probe that
determines the presence of the media rather than the presence of a carrier
on the media.  The NetBSD media framework really isn't set up for this sort of
situation, so it doesn't do a good job in selecting between the two
interfaces.  

Have you tried explicitly setting the media instance with the `ifconfig ... 
instance' command?

Eduardo