From: Samuel Thibault <Samuel.Thibault@ens-lyon.fr>
To: Paul Mackerras <paulus@samba.org>,
linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org,
torvalds@osdl.org
Subject: [PATCH] [2.6] adding xon/xoff support to ppp
Date: Sat, 26 Jul 2003 17:35:31 -0400 [thread overview]
Message-ID: <20030726213531.GA1148@bouh.unh.edu> (raw)
In-Reply-To: <20030712024216.GA399@bouh.unh.edu>
Hi,
It seems to have been dropped again, so I resend it.
Linux' ppp has not been implementing xon/xoff since 2.0 at least (a
thread on linux-ppp clearly stated that some years ago: just type
"pppd xonxoff": without the patch you can't stop the flow), here is a
patch to correct this on 2.6.0-test1 kernel. It has been well tested and
updated over the 2.2, 2.4 and 2.6 kernels.
Regards,
Samuel thibault
Add xon/xoff support to the ppp line discipline for async ports.
--- linux-2.6.0-test1-orig/drivers/char/tty_io.c 2003-07-26 17:25:28.000000000 -0400
+++ linux-2.6.0-test1-perso/drivers/char/tty_io.c 2003-07-14 01:11:25.000000000 -0400
@@ -611,6 +611,8 @@
(tty->driver->stop)(tty);
}
+EXPORT_SYMBOL(stop_tty);
+
void start_tty(struct tty_struct *tty)
{
if (!tty->stopped || tty->flow_stopped)
@@ -629,6 +631,8 @@
wake_up_interruptible(&tty->write_wait);
}
+EXPORT_SYMBOL(start_tty);
+
static ssize_t tty_read(struct file * file, char * buf, size_t count,
loff_t *ppos)
{
--- linux-2.6.0-test1-orig/drivers/net/ppp_async.c 2003-07-26 17:23:56.000000000 -0400
+++ linux-2.6.0-test1-perso/drivers/net/ppp_async.c 2003-07-14 01:12:45.000000000 -0400
@@ -891,6 +891,11 @@
process_input_packet(ap);
} else if (c == PPP_ESCAPE) {
ap->state |= SC_ESCAPE;
+ } else if (I_IXON(ap->tty)) {
+ if (c == STOP_CHAR(ap->tty))
+ stop_tty(ap->tty);
+ else if (c == START_CHAR(ap->tty))
+ start_tty(ap->tty);
}
/* otherwise it's a char in the recv ACCM */
++n;
prev parent reply other threads:[~2003-07-26 21:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-12 1:17 [PATCH] [2.5] adding ppp xon/xoff support Samuel Thibault
2003-07-12 1:30 ` Paul Mackerras
2003-07-12 2:42 ` Samuel Thibault
2003-07-12 3:09 ` Bug in open() function (?) J.C. Wren
2003-07-12 3:38 ` Andrew Morton
2003-07-12 5:11 ` Valdis.Kletnieks
2003-07-12 5:23 ` Andrew Morton
2003-07-12 6:14 ` Valdis.Kletnieks
2003-07-12 9:37 ` Andries Brouwer
2003-07-12 12:04 ` jw schultz
2003-07-12 5:39 ` J.C. Wren
2003-07-26 21:35 ` Samuel Thibault [this message]
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=20030726213531.GA1148@bouh.unh.edu \
--to=samuel.thibault@ens-lyon.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=paulus@samba.org \
--cc=samuel.thibault@fnac.net \
--cc=torvalds@osdl.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).