* [PATCH] TTY: fix UV serial console regression [not found] <4EDE988B.6010501@suse.cz> @ 2012-01-12 21:55 ` Jiri Slaby 2012-01-12 22:00 ` Greg KH 2012-01-12 23:41 ` Alan Cox 0 siblings, 2 replies; 4+ messages in thread From: Jiri Slaby @ 2012-01-12 21:55 UTC (permalink / raw) To: gregkh Cc: Arnd Bergmann, alan, linux-serial, jirislaby, linux-kernel, Jiri Slaby, 3.0 3.1 3.2 Commit 74c2107759d (serial: Use block_til_ready helper) and its fixup 3f582b8c110 (serial: fix termios settings in open) introduced a regression on UV systems. The serial eventually freezes while being used. It's completely unpredictable and sometimes needs a heap of traffic to happen first. To reproduce this, yast installation was used as it turned out to be pretty reliable in reproducing. Especially during installation process where one doesn't have an SSH daemon running. And no monitor as the HW is completely headless. So this was fun to find. Given the machine doesn't boot on vanilla before 2.6.36 final. (And the commits above are older.) Unless there is some bad race in the code, the hardware seems to be pretty broken. Otherwise pure MSR read should not cause such a bug, or? So to prevent the bug, revert to the old behavior. I.e. read modem status only if we really have to -- for non-CLOCAL set serials. Non-CLOCAL works on this hardware OK, I tried. See? I don't. And document that shit. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: 3.0 3.1 3.2 <stable@vger.kernel.org> References: https://lkml.org/lkml/2011/12/6/573 References: https://bugzilla.novell.com/show_bug.cgi?id=718518 --- drivers/tty/tty_port.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 7a4fb1c..1109e1b 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -227,7 +227,6 @@ int tty_port_block_til_ready(struct tty_port *port, int do_clocal = 0, retval; unsigned long flags; DEFINE_WAIT(wait); - int cd; /* block if port is in the process of being closed */ if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) { @@ -284,11 +283,14 @@ int tty_port_block_til_ready(struct tty_port *port, retval = -ERESTARTSYS; break; } - /* Probe the carrier. For devices with no carrier detect this - will always return true */ - cd = tty_port_carrier_raised(port); + /* + * Probe the carrier. For devices with no carrier detect + * tty_port_carrier_raised will always return true. + * Never ask drivers if CLOCAL is set, this causes troubles + * on some hardware. + */ if (!(port->flags & ASYNC_CLOSING) && - (do_clocal || cd)) + (do_clocal || tty_port_carrier_raised(port))) break; if (signal_pending(current)) { retval = -ERESTARTSYS; -- 1.7.8.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] TTY: fix UV serial console regression 2012-01-12 21:55 ` [PATCH] TTY: fix UV serial console regression Jiri Slaby @ 2012-01-12 22:00 ` Greg KH 2012-01-12 23:41 ` Alan Cox 1 sibling, 0 replies; 4+ messages in thread From: Greg KH @ 2012-01-12 22:00 UTC (permalink / raw) To: Jiri Slaby Cc: Arnd Bergmann, alan, linux-serial, jirislaby, linux-kernel, 3.0 3.1 3.2 On Thu, Jan 12, 2012 at 10:55:15PM +0100, Jiri Slaby wrote: > Commit 74c2107759d (serial: Use block_til_ready helper) and its fixup > 3f582b8c110 (serial: fix termios settings in open) introduced a > regression on UV systems. The serial eventually freezes while being > used. It's completely unpredictable and sometimes needs a heap of > traffic to happen first. > > To reproduce this, yast installation was used as it turned out to be > pretty reliable in reproducing. Especially during installation process > where one doesn't have an SSH daemon running. And no monitor as the HW > is completely headless. So this was fun to find. Given the machine > doesn't boot on vanilla before 2.6.36 final. (And the commits above > are older.) > > Unless there is some bad race in the code, the hardware seems to be > pretty broken. Otherwise pure MSR read should not cause such a bug, > or? > > So to prevent the bug, revert to the old behavior. I.e. read modem > status only if we really have to -- for non-CLOCAL set serials. > Non-CLOCAL works on this hardware OK, I tried. See? I don't. > > And document that shit. Thanks for tracking this down, I'll queue it up and get it to Linus after 3.3-rc1 is out. greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] TTY: fix UV serial console regression 2012-01-12 21:55 ` [PATCH] TTY: fix UV serial console regression Jiri Slaby 2012-01-12 22:00 ` Greg KH @ 2012-01-12 23:41 ` Alan Cox 2012-01-16 13:28 ` Jiri Slaby 1 sibling, 1 reply; 4+ messages in thread From: Alan Cox @ 2012-01-12 23:41 UTC (permalink / raw) To: Jiri Slaby Cc: gregkh, Arnd Bergmann, alan, linux-serial, jirislaby, linux-kernel, 3.0 3.1 3.2 > Unless there is some bad race in the code, the hardware seems to be > pretty broken. Otherwise pure MSR read should not cause such a bug, > or? UV serial being what actual hardware and system ? > So to prevent the bug, revert to the old behavior. I.e. read modem > status only if we really have to -- for non-CLOCAL set serials. > Non-CLOCAL works on this hardware OK, I tried. See? I don't. The old behaviour is rather driver dependant eg whether it used serial_core or not. Doesn't look an unreasonable change though. Alan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] TTY: fix UV serial console regression 2012-01-12 23:41 ` Alan Cox @ 2012-01-16 13:28 ` Jiri Slaby 0 siblings, 0 replies; 4+ messages in thread From: Jiri Slaby @ 2012-01-16 13:28 UTC (permalink / raw) To: Alan Cox Cc: Jiri Slaby, gregkh, Arnd Bergmann, alan, linux-serial, linux-kernel, 3.0 3.1 3.2 On 01/13/2012 12:41 AM, Alan Cox wrote: >> Unless there is some bad race in the code, the hardware seems to >> be pretty broken. Otherwise pure MSR read should not cause such a >> bug, or? > > UV serial being what actual hardware and system ? What exact paramteres are you interested in? dmidecode on this machine says it's an Altix XE310. thanks, -- js ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-16 13:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4EDE988B.6010501@suse.cz>
2012-01-12 21:55 ` [PATCH] TTY: fix UV serial console regression Jiri Slaby
2012-01-12 22:00 ` Greg KH
2012-01-12 23:41 ` Alan Cox
2012-01-16 13:28 ` Jiri Slaby
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).