[haiku-development] Re: Proposed addition to freebsd_network and marvell_yukon driver

  • From: Colin Günther <coling@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 03 Mar 2010 22:40:21 +0100

On 03.03.2010 09:49, Tomas Wilhelmsson wrote:

Other proposed changes to freebsd_network is for the ssb driver needed for BWM wifi driver (i think its a replacement for bwi driver)

Have less time to look into this atm, I would suggest to open an enhancement ticket on trac, where you can put your patches, so that they don't get lost. One ticket per patch would be best, as they aren't really related as far as I can tell. I'm supposing that the freebsd_network.patch is the one which is needed by the ssb driver (so i don't know what ssb is used for). And as Axel mentioned, would be nice to know which revision of FreeBSD you used, as there seems to be some copy and pasted code in the patches.


Anyhow, if anyone can fix up the marvell_yukon driver so that i can use my brand new laptop in haiku i would love you =)

Tried to clean up the patches but might have missed some basic coding guidelines, first try at getting something done for haiku =)

Have a nice day!
Tomas Wilhelmsson

When changing interrupt routines there are two files you need to look at: the driver file and the glue.c file. The glue.c file glues the Haiku interrupt handling code and the FreeBSD interrupt handling code together. So the Haiku part usually disables the interrupts of the network device, so that it stops interrupting as long as the interrupt wasn't handled by the FreeBSD part.

So it is best that this disabling happens only once (you may need to "uncomment" interrupt disabling in the FreeBSD driver, though (conditionally compilation is your friend here (have a look at wlan/atheroswifi/dev/ath/if_ath.c::ath_intr() for to get the idea))).

Then at some point the driver needs to reenable the interrupts again. Either this is done in the original FreeBSD-code already, than you don't have to do anything else, or there is nowhere a notion of reenabling interrupts (note: reenabling must not necessarily happen in the msk_intr() function) than you need to write a reenabling routine in glue.c (have a look at wlan/atheroswifi/glue.c).

Thanks for your efforts :)

-Colin

Other related posts: