linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Grant Edwards <grant.b.edwards@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: What to set uart_port->irq to for polled driver?
Date: Thu, 28 Feb 2013 15:16:33 -0500	[thread overview]
Message-ID: <1362082593.3337.16.camel@thor.lan> (raw)
In-Reply-To: <kgo8gf$b1e$1@ger.gmane.org>

On Thu, 2013-02-28 at 18:43 +0000, Grant Edwards wrote:
> On 2013-02-28, Peter Hurley <peter@hurleysoftware.com> wrote:
> > On Wed, 2013-02-13 at 15:24 +0000, Grant Edwards wrote:
> >> For a polled serial driver that doesn't use interrupts, to what should
> >> the "irq" field in the uart_port structure be set?  Should it be 0?
> >> Should it be the unused IRQ associated with the PCI card slot in which
> >> the board is found?
> >
> > Doesn't look supported, but adding the support doesn't look difficult.
> > At the very least, a patch is required so that on port shutdown, the
> > core doesn't synchronize_irq().
> 
> Does the call ty synchronize_irq() do any harm? AFAICT, it will just
> cause a short delay if handling of that IRQ is in-progress.
> 
> I currently set the "irq" field to the IRQ number that would be used
> by the board if I did choose to enable interrupts. That seems to work
> fine (with rather limited testing).

AFAICT, it's probably ok; but it might not be. Certainly more robust to
just add a UPF_POLLING flag and skip the synchronize_irq().

Is this an in-tree driver?

Regards,
Peter Hurley


  reply	other threads:[~2013-02-28 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 15:24 What to set uart_port->irq to for polled driver? Grant Edwards
2013-02-28 18:32 ` Peter Hurley
2013-02-28 18:43   ` Grant Edwards
2013-02-28 20:16     ` Peter Hurley [this message]
2013-02-28 20:42       ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362082593.3337.16.camel@thor.lan \
    --to=peter@hurleysoftware.com \
    --cc=grant.b.edwards@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).