Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 1999 22:42:59 +0100 (MET)
From:      Martin Husemann <martin@rumolt.teuto.de>
To:        is@jocelyn.rhein.de (Ignatios Souvatzis)
Cc:        andreas@klemm.gtn.com, freebsd-isdn@FreeBSD.ORG, hm@hcs.de
Subject:   Re: patch for layer1/i4b_isic.c (silence noisy debug message)
Message-ID:  <199901022142.WAA04635@rumolt.teuto.de>
In-Reply-To: <19990102181620.A2581@cosinus.cs.uni-bonn.de> from "Ignatios Souvatzis" at Jan 2, 99 06:16:20 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.


Martin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901022142.WAA04635>