All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stuart MacDonald" <stuartm@connecttech.com>
To: <linux-kernel@vger.kernel.org>
Subject: [Patch] Serial lockup fixed
Date: Mon, 5 Nov 2001 17:59:38 -0500	[thread overview]
Message-ID: <054801c1664d$8bc8eb80$294b82ce@connecttech.com> (raw)

After installing any serial-5.00 or later in kernels 2.2.18, 19 or 20,
rs_init is entered twice. This results in the serial timer being added
twice, which corrupts the timer list and causes an infinite loop. The
symptom is a complete hang on boot, usually just after the "Freeing
unused kernel memory" message.

Pre 18 the call path is do_basic_setup() -> device_setup() ->
chr_dev_setup() -> tty_init() -> rs_init().

In 2.4.x rs_init is entered with the module_init() (__initcall) magic.

The attached is for 2.2.20, and simply removes the tty_init() ->
rs_init() path. This mimics 2.4.x.

There might be an issue; do_initcalls() is slightly later in
do_basic_setup() than device_setup(), but the in between code looks
similar to 2.4.x kernels so I don't think it's a problem delaying the
serial init.

I'll post the slightly less elegant hack to the serial driver that
compensates for the broken kernels shortly.

Patch status is: Works For Me. Testers needed.

..Stu

----

diff -ru linux-2.2.20/drivers/char/tty_io.c
linux-2.2.20-serial-init-fix/drivers/char/tty_io.c
--- linux-2.2.20/drivers/char/tty_io.c Fri Nov  2 11:39:06 2001
+++ linux-2.2.20-serial-init-fix/drivers/char/tty_io.c Mon Nov  5 22:03:54
2001
@@ -2189,9 +2189,6 @@
 #ifdef CONFIG_ESPSERIAL  /* init ESP before rs, so rs doesn't see the port
*/
  espserial_init();
 #endif
-#ifdef CONFIG_SERIAL
- rs_init();
-#endif
 #ifdef CONFIG_COMPUTONE
  ip2_init();
 #endif



                 reply	other threads:[~2001-11-05 22:57 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='054801c1664d$8bc8eb80$294b82ce@connecttech.com' \
    --to=stuartm@connecttech.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 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.