[Top] [All Lists]

Re: bitrot in drivers/net/au1000_eth.c

To: Ulrich Eckhardt <>
Subject: Re: bitrot in drivers/net/au1000_eth.c
From: Pete Popov <>
Date: Fri, 28 Jan 2005 09:01:36 -0800
In-reply-to: <>
Organization: Embedded Alley Solutions, Inc
Original-recipient: rfc822;
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913
Ulrich Eckhardt wrote:

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: * FIXME
 * All of the PHY code really should be detached from the MAC
 * code.

Yes, I put that in over four years ago. There was no mii code at all, that I could find, at that time. I wanted to separate the mii code out of the mac driver but it never happened.

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.

For 2.6, I was told someone is working on something ...

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.

That's a possibility too but more code needs to be added to mii.c. I actually revisited the code yesterday and was trying to figure out how to clean it up. But someone told me that there is 2.6 work in progress to do this so I decided to just wait. Maybe someone knows more about it.


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