On Mon, Nov 19, 2007 at 09:49:41AM +0100, Dominik Brodowski wrote:
> On Mon, Nov 19, 2007 at 01:19:00AM -0800, Kristoffer Ericson wrote:
> > > Actually, why do you bother? The PCMCIA subsystem is capable of working 
> > > with
> > > shared IRQs...
> > > 
> > So I should have same interrupt for both? Isn't it important to know
> > where the IRQ came from? Thats what puzzles me.
> 
> Well, each IRQ handler needs to check whether it is indeed the one which was
> called. So, inside hd6441_interrupt() you'd need to do the following
> 
>       cscr = inb(cscr_reg);
>       if !(cscr & HD64461_PCCCSCR_IRQ)
>               return IRQ_NONE;
> 
> to avoid handling ("IRQ_HANDLED") an interrupt which wasn't caused by this
> device.
> 
Yes, this with IRQF_SHARED is certainly the preferred approach. The
current hd64461 IRQ demux is too bogus for words. The fact it doesn't
work at present shouldn't really be a surprise to anyone.

hd64465 PCMCIA probably wants the same treatment, though I haven't looked
to see if there's any point in trying to unify them in to a common
hd6446x PCMCIA driver or not. In any event, it would be nice to get both
of those cleaned up. hd64465_ss is already in-tree, and equally confused.

_______________________________________________
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

Reply via email to