[RFC] Patch to Abstract Ethernet PHY support (using driver model)

Jörn Engel joern at wohnheim.fh-wedel.de
Sat Jan 15 01:55:18 EST 2005


On Thu, 13 January 2005 17:00:16 -0800, Eugene Surovegin wrote:
> On Thu, Jan 13, 2005 at 10:58:08PM +0100, J?rn Engel wrote:
> > 
> > http://www.broadcom.com/collateral/pb/5325-PB05-R.pdf
> > 
> > With some thinking and very little code, you can use this neat chip
> > almost like a normal phy.
> 
> Yeah, but why would I want to? If you connect your MAC to any 5 PHYs 
> my statement still stands, if directly to MII you don't need any PHY 
> stuff at all, because link is always ON and speed/duplex is fixed.
> 
> In fact, we use different switch chips connected to PPC4xx directly. 
> In this situation, in my NAPI IBM EMAC driver I just have special 
> "PHY-less" case which is trivial "fixed settings" one. And all this 
> PHY lib is completely unneeded bloat.

Wrt. the proposed PHY lib, I agree.  Didn't even bother to look at the
code, it's mere size said enough.

But an abstraction different from drivers/net/mii.c is needed to
handle the 5325 chip.  Or, you could have the special cases all over
in your code, but that's a) ugly and b) more code.  I used to have
such a mess and after doing the proper abstraction, it line count went
down.

Jörn

-- 
Time? What's that? Time is only worth what you do with it.
-- Theo de Raadt



More information about the Linuxppc-embedded mailing list