[haiku-development] RTL8101/8102 FreeBSD Driver

Hi

I've been trying to build the 're' driver from FreeBSD 7.0 in Haiku. This is to support the RealTek 8101E/8102E ethernet card in my MSI Wind netbook. I'm able to build the driver, but it crashes when I plug in an ethernet cable, or startup with one in. (I'll put the stacktrace below.) On the plus side, it boots up really quickly and it gets picked up by ifconfig!

As it is very similar to the 'rl' driver ported to Haiku as the rtl8139 driver, I've used the same code to build re. That means I've added the if_re.c file into the rtl8139/pci folder and added a glue8101.c file. The glue8101.c file is identical to the existing glue.c file, but with the HAIKU_FBSD_DRIVER_GLUE define specified as:

HAIKU_FBSD_DRIVER_GLUE(rtl8101, re, pci);

Other than that, it's the same. I've linked against the same objects as the 8139 driver, and modified the RL_HWREV_8101E define to 0x34800000 (the hardware revision detected in the probe of the card). From what I can see, websites claim the MSI Wind has an 8101e card, but mine seems to think 8102e..... Anyway, this may be the root of the problem, but maybe not.

The stacktrace I'm seeing is (typed in manually - is there a better way of getting this info without a serial connection?):

80204e4c (+ 104) 8078f84a </boot/beos/system/add-ons/kernel/drivers/ dev/net/rtl8101>:tq_lock + 0x0019 80204eb4 (+ 48) 8078f8f0 </boot/beos/system/add-ons/kernel/drivers/ dev/net/rtl8101>:taskqueue_enqueue + 0x0025 80204ee4 (+ 32) 8078f952 </boot/beos/system/add-ons/kernel/drivers/ dev/net/rtl8101>:taskqueue_enqueue_fast + 0x001e 80204f04 (+ 32) 807859c5 </boot/beos/system/add-ons/kernel/drivers/ dev/net/rtl8101>:re_intr + 0x005a
80204f24 (+  48) 80038878 <kernel>:int_io_interrupt_handler + 0x00bb
....
....

I can get more info and supply the code if required, but I was wondering if there is anything more I should do with my glue.c file, as I guess that's where the problem may be.

Thanks
Graham

Other related posts: