cvs commit: src/sys/dev/mii acphy.c amphy.c bmtphy.c brgphy.c dcphy.c exphy.c lxtphy.c mii.c mii_physubr.c nsgphy.c nsphy.c pnaphy.c pnphy.c qsphy.c rgephy.c rlphy.c tdkphy.c tlphy.c ukphy.c ukphy_subr.c xmphy.c

Marius Strobl marius at alchemy.franken.de
Sat May 29 12:14:27 PDT 2004


On Sat, May 29, 2004 at 11:23:42AM -0700, Luigi Rizzo wrote:
> any chance that one day we try to collapse the common code into
> a set of default functions and a table with device types etc ?
> 
> At a quick glance many routines seem to be cut&pasted, with
> minor reordering of blocks that i am not even sure if they
> are correct or just the result of partial fixes to some modules
> but not others.
> 

I agree with you that these drivers are quite messy (to a lesser
extent also in NetBSD) and much of this could be fixed by collapsing
common code. NetBSD already went into that direction by e.g. using
mii_phy_setmedia() in a lot of drivers where the FreeBSD ones still
have their own code for MII_MEDIACHG in the respective xxx_service()
function. However, converting the FreeBSD drivers to also use such
functions which factor out common code may also cause problems as
decribed in e.g. the commit log of nsphy.c 1.22, so each conversion
would have to be tested thoroughly which requires owning a NIC with
the particular PHY :(



More information about the cvs-src mailing list