public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [BUG/PATCH] : bug in tty_default_put_char()
Date: Wed, 28 Aug 2002 15:41:03 -0700	[thread overview]
Message-ID: <20020828224103.GC12472@bougret.hpl.hp.com> (raw)
In-Reply-To: <20020826212223.H4763@flint.arm.linux.org.uk>

On Mon, Aug 26, 2002 at 09:22:23PM +0100, Russell King wrote:
> On Mon, Aug 26, 2002 at 01:17:32PM -0700, Jean Tourrilhes wrote:
> > 	It's possible that it's a bit more complex than that, but the
> > TTY stuff is a bit magic to me.
> 
> The patch appears to be in 2.5.31.
> 
> Ok, do you want me to cook up a patch to make ircomm bug() when put_char
> gets called when write_room would have returned 0 ?
> 
> Is it possible for the user who experienced the problem to try out such
> a patch?

	Hi,

	After sending you bogus path and bogus bug reports, I though
it would be time to send you a *real* patch.
	Patch below allow to set "uart=none", which is necessary for
FIR hardware. Patch for 2.5.31.

----------------------------------------------
diff -u -p linux/drivers/serial/core.r1.c linux/drivers/serial/core.c
--- linux/drivers/serial/core.r1.c      Wed Aug 28 11:54:20 2002
+++ linux/drivers/serial/core.c Wed Aug 28 11:58:21 2002
@@ -730,12 +730,17 @@ uart_set_info(struct uart_info *info, st
                 */
                if (port->type != PORT_UNKNOWN)
                        retval = port->ops->request_port(port);
+               else
+                       /* If we set the uart to unknown, we should *always*
+                        * succeed at the test below. - Jean II */
+                       retval = 0;
 
                /*
                 * If we fail to request resources for the
                 * new port, try to restore the old settings.
                 */
                if (retval && old_type != PORT_UNKNOWN) {
+                       DPRINTK("uart_set_info(%d): could not set new serial configuration, reverting to old one\n", MINOR(tty->device) - tty->driver.minor_start);
                        port->iobase = old_iobase;
                        port->type = old_type;
                        port->hub6 = old_hub6;
----------------------------------------------

	Regarding the initial bug I reported.
	The write is comming from the PPP line discipline. If PPP
can't transmit the data, it just drops it and assume higher layers
will retry. This is true for TCP, but not for "chat".
	I implemented the workaround, and the user report that it has
fixed his problem.
	I've also found a bunch of other bugs related to that in the
process, but I'll spare you the details.

	Have fun...

	Jean

  parent reply	other threads:[~2002-08-28 22:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 18:07 [BUG/PATCH] : bug in tty_default_put_char() Jean Tourrilhes
     [not found] ` <1030388224.2797.2.camel@irongate.swansea.linux.org.uk>
2002-08-26 18:59   ` Jean Tourrilhes
2002-08-26 19:07     ` Alan Cox
2002-08-26 20:17       ` Russell King
2002-08-26 19:31 ` Russell King
     [not found]   ` <20020826195346.GC8749@bougret.hpl.hp.com>
     [not found]     ` <20020826210159.E4763@flint.arm.linux.org.uk>
     [not found]       ` <20020826201732.GE8749@bougret.hpl.hp.com>
     [not found]         ` <20020826212223.H4763@flint.arm.linux.org.uk>
2002-08-28 22:41           ` Jean Tourrilhes [this message]
2002-08-28 23:16             ` Russell King

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=20020828224103.GC12472@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@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