From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Matt Schulte <matts@commtech-fastcom.com>
Cc: linux-serial@vger.kernel.org, Greg KH <greg@kroah.com>,
Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH] serial/8250: Add support for Exar's XR17V35x family of multi-port PCIe UARTs.
Date: Sat, 10 Nov 2012 23:24:44 +0000 [thread overview]
Message-ID: <20121110232444.7914f76f@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CAJp1Oe652P=eGTQjo2aWwn2f0iMDz0dM172QjkBcZhx+O2_Ygw@mail.gmail.com>
On Sat, 10 Nov 2012 11:52:32 -0600
Matt Schulte <matts@commtech-fastcom.com> wrote:
> On Fri, Nov 9, 2012 at 5:58 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >> @@ -1484,6 +1526,7 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status);
> >> int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
> >> {
> >> unsigned char status;
> >> + unsigned char int0, int1, int2, int3;
> >> unsigned long flags;
> >> struct uart_8250_port *up =
> >> container_of(port, struct uart_8250_port, port);
> >> @@ -1503,6 +1546,19 @@ int serial8250_handle_irq(struct uart_port
> >> *port, unsigned int iir)
> >> if (status & UART_LSR_THRE)
> >> serial8250_tx_chars(up);
> >>
> >> + /*
> >> + * These Exar UARTs have an extra interrupt indicator that could
> >> + * fire for a few unimplemented interrupts. Put this here just
> >> + * to be on the safe side that these interrupts don't go unhandled.
> >> + */
> >> +
> >> + if (up->port.type == PORT_XR17V35X && status == 0) {
> >> + int0 = serial_port_in(port, 0x80);
> >> + int1 = serial_port_in(port, 0x81);
> >> + int2 = serial_port_in(port, 0x82);
> >> + int3 = serial_port_in(port, 0x83);
> >> + }
> >> +
> >> spin_unlock_irqrestore(&port->lock, flags);
> >> return 1;
> >
> > Provide your own handle_irq method rather than adding more special cases
> > to the default one (you can just wrap the default one and then perform
> > the extra actions). Just a case of trying to keep the fast paths clean and
> > maintainable.
> >
> > Otherwise looks good.
> >
> > Alan
>
> Thanks Alan, would the new Exar_handle_irq method be allowed to be
> inside 8250.c?
If its probed generically then it probably should - we can move it later
anyway
next prev parent reply other threads:[~2012-11-10 23:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 22:39 [PATCH] serial/8250: Add support for Exar's XR17V35x family of multi-port PCIe UARTs Matt Schulte
2012-11-09 23:58 ` Alan Cox
2012-11-10 17:52 ` Matt Schulte
2012-11-10 23:24 ` Alan Cox [this message]
2012-11-13 19:26 ` Matt Schulte
2012-11-14 12:22 ` Alan Cox
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=20121110232444.7914f76f@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-serial@vger.kernel.org \
--cc=matts@commtech-fastcom.com \
--cc=tytso@mit.edu \
/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