public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Glen Turner <glen.turner@aarnet.edu.au>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 0/3 Fix serial console flow control
Date: Mon, 14 Oct 2002 10:16:03 +0930	[thread overview]
Message-ID: <3DAA13CB.20500@aarnet.edu.au> (raw)


A patch against 2.4.20-pre8 drivers/char/serial.c.  If it is
accepted I will port it other architectures and USB dongles.

The serial console driver contains a little documented 'r' option
which activates hardware flow control.  Eg: console=ttyS0,9600n8r

The RS-232 flow control option has a pathological condition.  When
Clear to Send is not asserted then console messages can take one
second per character to write.  Thus a machine connected to a
correctly configured idle in-dial modem or an idle terminal server may
take over 30 minutes to boot the kernel.

After considerable thought, I decided to augment the RS-232 flow
control with RS-232 status control.  This requires Data Set Ready and
Data Carrier Detect to be asserted before Clear to Send is tested.
RS-232-F states that CTS is not defined when DSR is unasserted.  There
appears to be no other way to make CTS flow control work correctly.

It was not possible to add this behaviour within the existing function
heirarchy of the serial console code of serial.c.  Although the
heirarchy has altered, the code fragments with that heirarchy remain
the same.

This code fixes all other bugs that have been reported to me as the
maintainer of the "Remote Serial Console HOWTO".  These are noted in
the code.  The most significant ones being:

  - in-dial modems hanging up on incoming calls during periods of lots
    of console messages (as during a failing disk).

  - modem configurations being subverted by non-root users.

The behaviour without the flow control option 'r' remains the same.

A set of sysctls are also added, at /proc/sys/dev/serialconsole/*.
These are required for user-space fault-finding (such as wiring issues
with RS-232 null modem cables and modem configurations).

Documentation is also enhanced, describing the flow control option,
the sysctls, and a pointer to the HOWTO.

serial.c's version is incremented from 5.05c to 5.05d.

Existing users configuring flow control will now need to present
RS-232 signals DSR and DCD in addition to CTS.  This should not
mitigate against applying the patch: all flow control users I know of
already provide the status lines and in any case are annoyed enough
the slow boot times to make any necessary cabling changes [as you
might be, if you had a supercomputing cluster that boots slower than a
486].

-- 
  Glen Turner                                 Network Engineer
  (08) 8303 3936      Australian Academic and Research Network
  glen.turner@aarnet.edu.au          http://www.aarnet.edu.au/
--
  The revolution will not be televised, it will be digitised


                 reply	other threads:[~2002-10-14  0:40 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=3DAA13CB.20500@aarnet.edu.au \
    --to=glen.turner@aarnet.edu.au \
    --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