Uhm.... for the Amiga there was no fiddling needed, if I recall right.
You #ifdef !__Amiga__ the message ;-)
I suggest to separate the functions
- "private interupt" flag enabling that debug message
- "clear interupt" routine, which might be NULL meaning "dont call it".
That's exactly what I tried to say (only you reversed the flag).
We already have a "clrirq" function pointer in struct isic_softc, which
is usualy NULL, but used on the ELSA QuickStep 1000 ISA and the ELSA
MicroLink ISDN/MC. The later driver uses a completely generic version
that could be used for all ISAC/HSCX based cards, and a generic IPAC
version could be written easily.
The board-specific attach function probably knows best what to do.
Not always, see for example the Atari vs. edge triggered ISA interrupts
problem. My proposal is: set "private interrupt" by the bus specific attach
code (on the ISA bus set it if an edge triggered interrupt could not be
allocated and we fall back to the level triggered one). Set a function pointer
to a clrirq routine when the card needs this always or has a special (more
efficient) way to acomplish it.
In the interrupt handler, if we found a source for an interrupt:
- call the clrirq routine, if it is not NULL (as needed by the ELSA QuickStep)
- if not "private interrupt" is set, call the generic clrirq routine for the
current chipset type (ISAC/IPAC)
Maybe we would save a few cycles if the bus specific attach code handles all
this and sets sc->clearirq to the generic routine after running the card
specific attach code, if that didn't set a clrirq function by itself and
the interrupt is not private.
To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message