From: Peter Hurley <peter@hurleysoftware.com> To: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Miller <davem@davemloft.net>, linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Seth Bollinger <sethb@digi.com>, Peter Hurley <peter@hurleysoftware.com> Subject: FW: Linux 3.15: SPARC serial console regression Date: Mon, 9 Jun 2014 19:48:17 -0400 [thread overview] Message-ID: <1402357697-20976-1-git-send-email-peter@hurleysoftware.com> (raw) In-Reply-To: <20140609205917.GA913@drone.musicnaut.iki.fi> On 06/09/2014 04:59 PM, Aaro Koskinen wrote:> Hi, > > While testing the final 3.15, I noticed the serial console (sunsab) > does not work anymore on Sun Ultra. > > It will tx fine the console output during the boot. But then I try > to type something e.g. at the login: prompt, it behaves oddly: > it re-transmits some old output, and then stalls for a few secs, usually > for each character. Typed characters are however received correctly. > But the console is impossible to use... > > I bisected this to: > > 717f3bbab3c7628736ef738fdbf3d9a28578c26c is the first bad commit > commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c > Author: Seth Bollinger <sethb@digi.com> > Date: Tue Mar 25 12:55:37 2014 -0500 > > serial_core: Fix conditional start_tx on ring buffer not empty [Let's try that again. This time without the mess] Thanks for the report Aaro. Looks like Seth's fix exposes some broken assumptions in the Sun serial drivers. Can you test the patch below? Regards, Peter Hurley PS - Do you have a way to test also your setup using hardware flow control, ie. CRTSCTS? I ask because I would expect that to be broken even before Seth's patch. --- %< --- From: Peter Hurley <peter@hurleysoftware.com> Date: Mon, 9 Jun 2014 19:21:43 -0400 Subject: [PATCH] serial: sunsab: Test for no tx data on tx restart Commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c, 'serial_core: Fix conditional start_tx on ring buffer not empty' exposes an incorrect assumption in sunsab's start_tx method; the tx ring buffer can, in fact, be empty when restarting tx when performing flow control. Test for empty tx ring buffer when in sunsab's start_tx method. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> --- drivers/tty/serial/sunsab.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 5faa8e9..b99a4ea 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port) struct circ_buf *xmit = &up->port.state->xmit; int i; + if (uart_circ_empty(xmit)) + return; + up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR); writeb(up->interrupt_mask1, &up->regs->w.imr1); -- 2.0.0
WARNING: multiple messages have this Message-ID (diff)
From: Peter Hurley <peter@hurleysoftware.com> To: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Miller <davem@davemloft.net>, linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Seth Bollinger <sethb@digi.com>, Peter Hurley <peter@hurleysoftware.com> Subject: FW: Linux 3.15: SPARC serial console regression Date: Mon, 09 Jun 2014 23:48:17 +0000 [thread overview] Message-ID: <1402357697-20976-1-git-send-email-peter@hurleysoftware.com> (raw) In-Reply-To: <20140609205917.GA913@drone.musicnaut.iki.fi> On 06/09/2014 04:59 PM, Aaro Koskinen wrote:> Hi, > > While testing the final 3.15, I noticed the serial console (sunsab) > does not work anymore on Sun Ultra. > > It will tx fine the console output during the boot. But then I try > to type something e.g. at the login: prompt, it behaves oddly: > it re-transmits some old output, and then stalls for a few secs, usually > for each character. Typed characters are however received correctly. > But the console is impossible to use... > > I bisected this to: > > 717f3bbab3c7628736ef738fdbf3d9a28578c26c is the first bad commit > commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c > Author: Seth Bollinger <sethb@digi.com> > Date: Tue Mar 25 12:55:37 2014 -0500 > > serial_core: Fix conditional start_tx on ring buffer not empty [Let's try that again. This time without the mess] Thanks for the report Aaro. Looks like Seth's fix exposes some broken assumptions in the Sun serial drivers. Can you test the patch below? Regards, Peter Hurley PS - Do you have a way to test also your setup using hardware flow control, ie. CRTSCTS? I ask because I would expect that to be broken even before Seth's patch. --- %< --- From: Peter Hurley <peter@hurleysoftware.com> Date: Mon, 9 Jun 2014 19:21:43 -0400 Subject: [PATCH] serial: sunsab: Test for no tx data on tx restart Commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c, 'serial_core: Fix conditional start_tx on ring buffer not empty' exposes an incorrect assumption in sunsab's start_tx method; the tx ring buffer can, in fact, be empty when restarting tx when performing flow control. Test for empty tx ring buffer when in sunsab's start_tx method. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> --- drivers/tty/serial/sunsab.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 5faa8e9..b99a4ea 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port) struct circ_buf *xmit = &up->port.state->xmit; int i; + if (uart_circ_empty(xmit)) + return; + up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR); writeb(up->interrupt_mask1, &up->regs->w.imr1); -- 2.0.0
next prev parent reply other threads:[~2014-06-09 23:48 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-09 20:59 Linux 3.15: SPARC serial console regression Aaro Koskinen 2014-06-09 20:59 ` Aaro Koskinen 2014-06-09 23:43 ` On 06/09/2014 04:59 PM, Aaro Koskinen wrote:> Hi, Peter Hurley 2014-06-09 23:43 ` Peter Hurley 2014-06-09 23:48 ` Peter Hurley [this message] 2014-06-09 23:48 ` FW: Linux 3.15: SPARC serial console regression Peter Hurley 2014-06-10 18:53 ` Aaro Koskinen 2014-06-10 18:53 ` Aaro Koskinen 2014-06-10 19:24 ` Sam Ravnborg 2014-06-10 19:24 ` Sam Ravnborg 2014-06-10 21:20 ` Peter Hurley 2014-06-10 21:20 ` Peter Hurley 2014-06-15 18:56 ` Sam Ravnborg 2014-06-15 18:56 ` Sam Ravnborg 2014-06-16 14:24 ` Thomas Bogendoerfer 2014-06-16 14:24 ` Thomas Bogendoerfer 2014-06-16 15:37 ` Peter Hurley 2014-06-16 15:37 ` Peter Hurley 2014-06-18 6:19 ` David Miller 2014-06-18 6:19 ` David Miller 2014-06-13 20:18 ` Linux 3.15: " Aaro Koskinen 2014-06-13 20:18 ` Aaro Koskinen 2014-07-06 15:29 ` [PATCH 0/2] fixes for empty tx buffer breakage Peter Hurley 2014-07-06 15:29 ` [PATCH 1/2] serial: Test for no tx data on tx restart Peter Hurley 2014-07-06 15:29 ` [PATCH 2/2] serial: arc_uart: Use uart_circ_empty() for open-coded comparison Peter Hurley 2014-07-10 23:14 ` [PATCH 0/2] fixes for empty tx buffer breakage Greg Kroah-Hartman 2014-07-10 23:12 ` David Miller 2014-07-10 23:29 ` Greg KH
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=1402357697-20976-1-git-send-email-peter@hurleysoftware.com \ --to=peter@hurleysoftware.com \ --cc=aaro.koskinen@iki.fi \ --cc=davem@davemloft.net \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sethb@digi.com \ --cc=sparclinux@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.