How to support an Ethernet PHY without ID registers?

Bernd Walter ticso at
Sat Nov 22 14:42:22 PST 2008

On Tue, Oct 07, 2008 at 08:09:10PM +0100, Bruce M Simpson wrote:
> Hi,
> I have been trying to get FreeBSD onto the Freecom FSG3 Storage Gateway.
> It is an xScale based ARM system.
> Whilst the npe(4) driver appears to attach, the PHY does not. It is a 
> Realtel RTL8305SB switch chip in dual miibus mode. Unfortunately the 
> RTL8305SB does not have ID registers. The RTL8305SC does, but it's a 
> totally different chip.
> We do have a driver in the tree for the RTL8305SC, however these chips 
> are different enough for this to cause problems.
> Is there any way I could for example force ukphy(4) to attach?

A late response...
rlswitch is there for two reasons: forcing speed independed of port0
autoselect and setting VLAN (using hardcoded values though).
I never worked with the SB, but read the datasheet a while back
before I ordered the SC for my project.
IIRC the SB has no VLAN support.
Not sure about registers - maybe it really hasn't any or MDIO isn't
connected with your hardware.
I would suggest that you localy patch the rlswitch driver to always
attach and be done with it.
ukphy would try to read link parameters, which will fail and report
wrong speed - MII speed of course is always 100/FDX.

> Note: Because there are no ID registers, mii_phy_probe_gen() WILL NOT 
> work. It looks like I'd have to override this by hacking if_npe.c 
> itself. Can anyone clarify?

This is possible as well, you can patch if_npe.c to return faked phy
register values.

B.Walter <bernd at>
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.

More information about the freebsd-net mailing list