public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Arnd Bergmann <arnd@arndb.de>, Greg KH <gregkh@suse.de>,
	Jiri Slaby <jirislaby@gmail.com>
Subject: UV serial regression since 2.6.36
Date: Tue, 06 Dec 2011 23:34:51 +0100	[thread overview]
Message-ID: <4EDE988B.6010501@suse.cz> (raw)

Hi,

In short, the issue causes serial port traffic to stop after some time
on UV machines. Only when serial is used as a console. It worked
perfectly with 2.6.32. It's a standard 16550 on 0x3f8 (well, it's
emulated to be at that port). Also in the PNP subsys.

To reproduce that 'debug' kernel parameter must not be used.

The root cause seems to be that the serial "chip" there has problems
with interrupts. It generates some but doesn't indicate it's the source
or somebody clears it (NOINT is set). And when it is supposed to
generate one (on THRE), it does not. So there are bytes in the TX buffer
which are never sent. Until the port is kicked e.g. by "echo h >
/proc/sysrq-trigger".

The unhandled interrupts were always an issue, but somehow hidden. It
became a real problem with patches post 2.6.32.

I bisected it to these two commits _together_:

commit 3f582b8c11014e4ce310d9839fb335164195333f
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Jun 29 22:31:40 2010 +0200

    serial: fix termios settings in open

AND

commit 74c2107759dc6efaa1b9127014be58a742a1e7ac
Author: Alan Cox <alan@linux.intel.com>
Date:   Tue Jun 1 22:53:00 2010 +0200

    serial: Use block_til_ready helper

Those reverted on the top of 2.6.37 makes it work again. Those reverted
on the top of 3.0 plus mine 3 reverted which removed update_set_termios
completely makes it work again.

I didn't look closely to why those patches are causing that. Like
c_cflag copy in uart_update_termios and "tty->termios->c_cflag & CBAUD"
test in tty_port_block_til_ready don't look good to me...

<rant from a person who spent with that bug 2 weeks :( >
I had to bisect three times. First to find a patch which allows booting
on <2.6.36 kernels on that machine. Second to narrow down the interval
-- it pointed to a merge commit. The third one to find the culprit.

The third one was unsuccessful because of two commits causing the issue.
Yes, hunting this crap

Now I'm going on vacation till the end of the year so I will be seldomly
responding.
</rant>

thanks,
-- 
js
suse labs

             reply	other threads:[~2011-12-06 22:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 22:34 Jiri Slaby [this message]
2012-01-04 18:41 ` UV serial regression since 2.6.36 Jiri Slaby
2012-01-04 20:53   ` Greg KH
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

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=4EDE988B.6010501@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@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: 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