For the curious, I have updated my take on the pc/ether8169.c driver, to add support for all the families in the RTL8169 "order":
http://downloads.kergis.com/misc/9front/ether8169.c I'm not ignoring Aidan's work: I'm matching what is in the Realtek's published (FreeBSD) driver and what he has done and I'm trying to organize the Realtek's driver and to simplify. In a nutshell, the mac version leads to a record of specifications, with size of the MTU, flags and initial magic code. After matching the PCI (vid, did), we look for the macv to match a specification. If there is none (it should be the complete list), the device is dropped at least by this driver. If this was not enough, even with a macv, in some cases exceptions have to be taken into account (there are no Macfg_74 and Macfg_75 in the array, because these are subcases of Macfg_69 and are detected later). The initialization is done following the order given in th Realtek driver, with some general initializations, then the idiosynchrasies (magic code written for the MAC), followed by configuring the PHY. Contrary to what I thought would be better first, the idiosynchrasies are not segregated in another file, but put last in the very file, so that, as much as possible, the logics can be grasped, while the details (and, de facto, the black magic because one can wonder what the code does...) are exiled after. The work is not finished because I have still to entangle what concerns the PHY and I have to give a look to the interrupts (Aidan has added some code) and about the clock. I didn't know anything about the stuff before starting, so have downloaded the 802.3 spec (> 7000 pages...), so, obviously, I will continue ignoring a majority of this stuff. But from what I gathered, we will do nothing about MDIO, but stick to MII (the question being: will this be sufficient with a frequency >= 2.5Ghz ?). We will do nothing concerning Management, Administration and so on either. As is my method, I write and didn't try to compile anything before I judge I have reached a working state. I will try to compile only when it's ready to there can be blunders (I'm playing Dr Frankenstein taking pieces here and there and accommodating the whole by sewing; this will not be a work of art and this is why I'm exiling the ugly bits in the end of the file). But this is not vaporware: this is progressing as one can see using the link given above. -- Thierry Laronde <tlaronde +AT+ kergis +dot+ com> http://www.kergis.com/ http://kertex.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T58f306392c5b4ca9-Mc900dfd8273247bb5ca1df6f Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
