[Top] [All Lists]

bitrot in drivers/net/au1000_eth.c

Subject: bitrot in drivers/net/au1000_eth.c
From: Ulrich Eckhardt <>
Date: Fri, 28 Jan 2005 15:01:17 +0100
Organization: Sator Laser GmbH
Original-recipient: rfc822;
User-agent: KMail/1.7.1

I've been debugging a problem in above mentioned file and found several cases 
of redundant, unused or even buggy code in the handling of the MII there. 
Also, there is a comment that suggests that I'm not the only one: 
 * All of the PHY code really should be detached from the MAC
 * code.

An important point there is that much of the code is in fact not even specific 
to the au1x00 ethernet adapters. I found driver code for the MII I wanted to 
drive in sis900.c, and it looked almost similar to the code in au1x00.c. 
Simply adding the device/vendor IDs to a map and choosing the first of the 
drivers there got my ethernet running.

Now, question is how to proceed. There are basically three ways I would go:
1. Leave it like it is, because someone else is working on it. I'd just post a 
mini-patch that binds my device to an existing driver.
2. Remove the dead/unused parts from au1x00.c, try to restructure and document 
the code so it is easier to maintain in the future.
3. Split off the MII handling code or, better, reuse the facility already 
provided by drivers/net/mii.c. This would mean a significant rewrite of 
au1x00.c, including probably breaking things on the way.


<Prev in Thread] Current Thread [Next in Thread>