R: R: How to avoid serial port buffer overruns?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Messaggio originale-----
> Da: Robert Hancock [mailto:[email protected]]
> Inviato: venerdì 18 agosto 2006 16.31
> A: Giampaolo Tomassoni
> Cc: Linux Kernel ML
> Oggetto: Re: R: How to avoid serial port buffer overruns?
>
> IRQ_HANDLED vs. IRQ_NONE has no effect on what interrupt handlers are 
> called, etc. It is only used to detect if an interrupt is firing without 
> being handled by any driver, in this case the kernel can detect this and 
> disable the interrupt.
> 
> I'm not sure exactly why the driver is returning IRQ_HANDLED all the 
> time, but edge-triggered interrupts are always tricky and there may be a 
> case where it can't reliably detect this. Returning IRQ_HANDLED is the 
> safe thing to do if you cannot be sure if your device raised an 
> interrupt or not.

Oh, I see. This in handle_IRQ_event in /kernel/irq/handle.c confirms what you said:

        do {
                ret = action->handler(irq, action->dev_id, regs);
                if (ret == IRQ_HANDLED)
                        status |= action->flags;
                retval |= ret;
                action = action->next;
        } while (action);

There is no escape from the loop when the handler returns IRQ_HANDLED.

Thanks,

	giampaolo

> 
> -- 
> Robert Hancock      Saskatoon, SK, Canada
> To email, remove "nospam" from [email protected]
> Home Page: http://www.roberthancock.com/
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux