public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BUG? SA_INTERRUPT and shared IRQs
@ 2003-02-23  9:36 James Harper
  0 siblings, 0 replies; only message in thread
From: James Harper @ 2003-02-23  9:36 UTC (permalink / raw)
  To: linux-kernel

i'm having a problem with crashes which i think is to do with shared 
irq's. i have too many things hanging off my PCI bus... dammit.

on IRQ 19 i have:
wlan0 (prism2 based wireless card running hostap)
ens1371 (soundcard)
uhci-hcd (USB driver)

wlan0 and uhci-hcd call request_irq with SA_SHIRQ
ens1371 calles request_irq with SA_SHIRQ | SA_INTERRUPT

the code that calls the interrupt handlers appears to be: 
(arch/i386/kernel/irq.c)

int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct 
irqaction * action)
{
        int status = 1; /* Force the "do bottom halves" bit */

        if (!(action->flags & SA_INTERRUPT))
                local_irq_enable();

        do {
                status |= action->flags;
                action->handler(irq, action->dev_id, regs);
                action = action->next;
        } while (action);
        if (status & SA_SAMPLE_RANDOM)
                add_interrupt_randomness(irq);
        local_irq_disable();

        return status;
}

which looks to me that interrupts are going to get enabled if the 
_first_ handler in the chain _doesn't_ have SA_INTERRUPT set, which 
isn't the behaviour i'd expect. a later handler might freak if it makes 
the assumption that interrupts are disabled (or maybe this doesn't 
happen)...

i'm not sure what the correct thing to do here is... is it okay to 
enable or disable interrupts for each handler depending on their own 
SA_INTERRUPT flag? if that's the case then the patch is trivial...

thanks

James



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-23  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-23  9:36 BUG? SA_INTERRUPT and shared IRQs James Harper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox