From: Michael Hanselmann <linux-kernel@hansmi.ch>
To: rmk+serial@arm.linux.org.uk
Cc: linux-serial@vger.kernel.org
Subject: Hang in uart_block_til_ready()
Date: Sun, 2 Apr 2006 15:51:38 +0200 [thread overview]
Message-ID: <20060402135138.GC2954@hansmi.ch> (raw)
[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]
Hello Russell
I've discovered a problem where I'm not sure wether it's an error in the
kernel or in the hardware.
The hardware I'm using for the serial console is a HP Lights-Out 100
Management. It provides a (virtual) serial port which then can be used
for remote administration over the network and is available as ttyS2 in
Linux. I'm using it for a serial console.
When doing open("/dev/ttyS2", O_RDWR) from userland, like it's done by
screen(1) and by my test program, the kernel "hangs" in the schedule()
call in the function uart_block_til_ready of serial_core.c.
The patch below fixes it, but I'm not sure wether it is the correct way,
nor if it might create other problems.
The problem was reproducable with 2.6.15.6, 2.6.16 and 2.6.16-git20 (all
vanilla). I've not been able to reproduce it on another box where the
serial console is on ttyS0 and done by a common 16550A-compatible chip.
Do you or somebody else have an idea what's going on here and how to fix
it correctly?
Thanks,
Michael
---
--- linux-2.6.16-hardened/drivers/serial/serial_core.c.orig 2006-04-02 15:07:43.000000000 +0200
+++ linux-2.6.16-hardened/drivers/serial/serial_core.c 2006-04-02 15:24:52.000000000 +0200
@@ -1456,6 +1456,10 @@ uart_block_til_ready(struct file *filp,
break;
}
+ /* hansmi: fixes a hang on open("/dev/ttyS2", O_RDWR) for me */
+ if (uart_console(port) && (port->cons->flags & CON_ENABLED))
+ break;
+
/*
* Set DTR to allow modem to know we're waiting. Do
* not set RTS here - we want to make sure we catch
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next reply other threads:[~2006-04-02 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-02 13:51 Michael Hanselmann [this message]
2006-04-02 14:38 ` Hang in uart_block_til_ready() Russell King
2006-04-02 15:17 ` Michael Hanselmann
2006-04-02 15:23 ` Russell King
2006-04-02 15:42 ` Michael Hanselmann
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=20060402135138.GC2954@hansmi.ch \
--to=linux-kernel@hansmi.ch \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+serial@arm.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).