linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Guy M. Streeter" <streeter@redhat.com>
To: linuxppc-embedded <linuxppc-embedded@lists.linuxppc.org>
Subject: spurious hangups on serial console
Date: 27 Oct 2003 13:32:59 -0600	[thread overview]
Message-ID: <1067283179.1034.44.camel@jarjar.hsv.redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

 I have been investigating a situation where the login prompt begins to
fail on a serial console. What I have discovered is that there is an
unexpected call to the serial driver's hangup() routine, between the
login prompt and the password prompt.
 I traced this to do_tty_hangup() (called from sys_vhangup), and I see
that it attempts to avoid calling the driver's hangup() routine for the
console device. The test for the console doesn't account for serial
console. The attached patch adds a check for ttyS0 if serial console is
configured.
 I only see this problem only recent kernels, and I don't know what
changed to make it start happening. Perhaps someone else has a better
idea?

--Guy



[-- Attachment #2: serial_hangup.diff --]
[-- Type: text/plain, Size: 894 bytes --]

--- v2.4.23-pre8/drivers/char/tty_io.c.orig	2003-10-27 13:22:19.000000000 -0600
+++ v2.4.23-pre8/drivers/char/tty_io.c	2003-10-27 13:23:49.000000000 -0600
@@ -109,6 +109,7 @@ extern void con_init_devfs (void);
 extern void disable_early_printk(void);

 #define CONSOLE_DEV MKDEV(TTY_MAJOR,0)
+#define SERIAL_CONSOLE_DEV MKDEV(TTY_MAJOR,64)
 #define TTY_DEV MKDEV(TTYAUX_MAJOR,0)
 #define SYSCONS_DEV MKDEV(TTYAUX_MAJOR,1)
 #define PTMX_DEV MKDEV(TTYAUX_MAJOR,2)
@@ -461,6 +462,9 @@ void do_tty_hangup(void *data)
 	for (l = tty->tty_files.next; l != &tty->tty_files; l = l->next) {
 		struct file * filp = list_entry(l, struct file, f_list);
 		if (filp->f_dentry->d_inode->i_rdev == CONSOLE_DEV ||
+#ifdef CONFIG_SERIAL_CONSOLE
+		    filp->f_dentry->d_inode->i_rdev == SERIAL_CONSOLE_DEV ||
+#endif
 		    filp->f_dentry->d_inode->i_rdev == SYSCONS_DEV) {
 			cons_filp = filp;
 			continue;

                 reply	other threads:[~2003-10-27 19:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1067283179.1034.44.camel@jarjar.hsv.redhat.com \
    --to=streeter@redhat.com \
    --cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).