Date: Sat, 29 May 2004 21:14:08 +0200 From: Marius Strobl <marius@alchemy.franken.de> To: Luigi Rizzo <rizzo@icir.org> Cc: cvs-all@FreeBSD.org Subject: Re: 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 Message-ID: <20040529211408.P251@newtrinity.zeist.de> In-Reply-To: <20040529112342.A55353@xorpc.icir.org>; from rizzo@icir.org on Sat, May 29, 2004 at 11:23:42AM -0700 References: <200405291809.i4TI9Bds073061@repoman.freebsd.org> <20040529112342.A55353@xorpc.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 :(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040529211408.P251>