[haiku-development] Re: My "monkey-port" of DEC/Intel 21143 "dc" FreeBSD driver. Some advices needed.
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 15 Dec 2008 23:41:47 +0100 CET
Siarzhuk Zharski <zharik@xxxxxx> wrote:
> The Question #2: Yes, I'm not right to comment out this code, but
> what
> can cause such persistent hang at start of the system? Any advices to
> check or trace?
I currently don't really have the time to look into this, but the most
problematic point of the FreeBSD drivers is the interrupt handling,
since they usually do it in a lower soft interrupt that Haiku does not
support (only the ipro1000 driver does this the right way, and works
more or less without any extra glue).
So if your glue code is not correct, you'll likely get such hangs. And
if you turn off interrupts, it's not too surprising that the card
doesn't work anymore :-)
The problem is that you have to correctly acknowledge the interrupt
before leaving the interrupt routine, as you currently cannot tell our
hardware interrupt handler to not acknowledge the PCI interrupt. If
your device still has the interrupts asserted, it will just cause the
PCI bus to generate another interrupt, and so on.
I wanted to look into this problem again in a few weeks to simplify
porting FreeBSD drivers - maybe we can just change how we deal with
interrupts by adding a special flag for those.
Bye,
Axel.
Other related posts: