Subject: Re: HomePNA problems
To: Jarkko Teppo <jarkko.teppo@er-grp.com>
From: Erik E. Fair <fair@clock.org>
List: port-alpha
Date: 01/05/2003 12:30:10
Jarkko,

Instance counting starts from zero, which means that the first PHY 
reported by autoconfig at boot time for each individual Ethernet 
interface is instance zero, regardless of the PHY number on the MII. 
See PR kern/18762 for my complaint about this. So, to enable your 
HomePNA PHY, you need:

	ifconfig vr0 instance 0 inet <whatever> netmask <whatever> up

When I changed almost all the Ethernet drivers so that PHYs other 
than zero could be selected, the standard PHY selection code 
defaulted to the last PHY found on that MII which reports it can do 
auto (802.11u Nway negotiation). For systems that have more than one 
PHY on an Ethernet that can do auto negotiation, the *last* PHY found 
gets selected by default, and in some cases, that PHY wasn't wired to 
anything. There was a brief discussion of this on tech-net last 
October.

You should also enable the "amhphy" driver to properly attach to the 
10base-T PHY on the AMD 79c901.

[i386 digression on port-alpha; apologies]

In the system that's giving me the trouble reported in PR kern/18590 
is an AMD EasyNow PC, an all-in-one "legacy-free" PC. It's really a 
Biostar M5SAF motherboard, and is also sold in Europe as the Fujitsu 
"Celvin" (or was), and the SiS 900 isn't a separate chip - it's a 
core inside the SiS 960 "Super Southbridge" chip, which includes just 
about everything other than the CPU and the graphics in this system 
(e.g. USB, audio, Ethernet, PCI IDE, etc).

The documentation for this system is very clear about supporting 
10/100 Ethernet, which only the internal PHY on the SiS 900 can do; 
I'm pretty sure that only the HomePNA pins of the AMD Am79c901 are 
wired up to the RJ-11 modem jack, and the RJ-45 for 10/100 is wired 
to the SiS 960, which is why I don't get "link" when I try to use the 
AMD 10base-T PHY - they left it disconnected because they didn't need 
that part of it. I've also installed both NT and Win98 on this box to 
test the hardware, and 10/100 Ethernet works under both those OS's, 
so I'm sure I have working hardware - it's a driver issue.

I've also studied the Linux SiS 900 driver at length (supported by 
SiS themselves!), and I can't see anything in there that we're doing 
differently, though there are some extra cases for pulling out the 
Ethernet address at initialization time for different revs of the 
chip/core. I've tried to boot RedHat and SuSe Linux on this box, but 
both failed utterly, where both NetBSD and FreeBSD ISOs boot just 
fine. A friend has suggested Klonopix, and I'll try that when I get 
around to it. I think there's a tweak to the SiS 960 to make the SiS 
900 internal PHY enable itself somehow. I may have to disassemble the 
NT driver or something (feh).

For now, I've attached a USB 10/100 Ethernet (aue) to the system, but 
it hangs under NFS load, so I can only use it for simple stuff. 
That's better than nothing, though.

	Erik <fair@clock.org>