On 5/31/06, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
I can say for sure about the SiS 900 driver which you could use to check if your "ported" driver is correct.
This occurred to me, but the seeming simplicity of the rtl8139 code was enticing, especially since the bebits dp83815 was very similar when I first glanced at them.
I will take a closer look at the sis900 now, and may restructure the dp83815 code to match it a little more closely if I find it to be more robust..
What did you need to change anyway? A BeOS driver should compile under Haiku without changes.
Mostly, I wanted to see what amount of code was essentially "generic" from one driver to the next, and what parts were very specific to the card. In doing this, I did get a better grasp of how the various hooks are used, and what they need to do. I felt it was a good self-educating project. I did leave a couple mistakes in there that I have since fixed in my local version - they were mostly cosmetic or debug output, but one probably prevented it from compiling on PPC.
Initially, the dp83815 from bebits would not compile as it came with it's own kernel_driver.h which was slightly different than the Haiku version (the enums were different, and the #define's were named differently also IIRC)
It also appeared to a chunks of code that were either completely unused, or seemed to be implemented in a cleaner way in the rtl8139 driver, so I felt it was worth re-doing.
However, I may go back and try making only the minimal changes needed to the dp83815 driver from bebits to see what it takes to make it compile.
Other drivers I want to tackle eventually (unless someone else does first) are ne2k, pcnet32, and possibly 3c905 (and related chipsets) - although the 3com is probably most complicated, and I think Cye Stoner may already have started to work on it.