lkml.org 
[lkml]   [2006]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectR: R: How to avoid serial port buffer overruns?
    Date
    > -----Messaggio originale-----
    > Da: Robert Hancock [mailto:hancockr@shaw.ca]
    > 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 hancockr@nospamshaw.ca
    > Home Page: http://www.roberthancock.com/
    >

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

    \
     
     \ /
      Last update: 2006-08-18 17:01    [W:0.024 / U:29.844 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site