[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130315202452.GA15617@kroah.com>
Date: Fri, 15 Mar 2013 13:24:52 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Gregory CLEMENT <gregory.clement@...e-electrons.com>,
Jamie Iles <jamie@...ieiles.com>,
Jason Cooper <jason@...edaemon.net>,
Andrew Lunn <andrew@...n.ch>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-serial@...r.kernel.org
Subject: Re: Serial port initialization broken on Armada 370/XP due to
"serial: 8250_dw: Don't use UPF_FIXED_TYPE"
On Thu, Feb 28, 2013 at 02:34:21PM +0200, Heikki Krogerus wrote:
> Hi,
>
> On Thu, Feb 28, 2013 at 12:42:06PM +0100, Gregory CLEMENT wrote:
> > >> Would you agree with this kind of patch to fix the issue?
> > >>
> > >> diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
> > >> index e2ac25a..0b284c6 100644
> > >> --- a/drivers/tty/serial/8250/8250.c
> > >> +++ b/drivers/tty/serial/8250/8250.c
> > >> @@ -1119,7 +1119,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
> > >> serial_out(up, UART_LCR, 0);
> > >>
> > >> serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
> > >> - scratch = serial_in(up, UART_IIR) >> 6;
> > >> + scratch = (serial_in(up, UART_IIR) & 0xFF) >> 6;
> > >>
> > >> switch (scratch) {
> > >> case 0:
> > >
> > > Instead, can you test if it's enough for you to set the reg-io-width
> > > to 1 instead of 4:
> >
> > Yes indeed it worked and it seems to be the correct description of my
> > hardware. So I will fix the dtsi file.
> >
> > However isn't buggy to use a function as it returned a char whereas
> > it returns an int?
>
> Yes, the driver should probable be cleaned.
>
> It seems to be happening in quite a few places in 8250.c.
> autoconfig_16550a() has pretty much identical code in it, where
> UART_IIR is read to unsigned char and shifted without a mask.
Can someone send me the correct fix here, if they want it included in
3.9-final?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists