Re: [PATCH] serial/8250: Add support for Exar's XR17V35x family of multi-port PCIe UARTs.

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

 



On Sat, 10 Nov 2012 11:52:32 -0600
Matt Schulte <matts@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Fri, Nov 9, 2012 at 5:58 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux