bitrot in drivers/net/au1000_eth.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

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.

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.

Uli


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux