linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4.28-rc1
Date: Sat, 23 Oct 2004 08:30:20 -0500	[thread overview]
Message-ID: <1098538220.5960.2.camel@at2.pipehead.org> (raw)
In-Reply-To: <20041022185953.GA4886@logos.cnet>

On Fri, 2004-10-22 at 13:59, Marcelo Tosatti wrote:
> Here goes the first release candidate of v2.4.28.

Any chance of getting this in?

-- 
Paul Fulghum
paulkf@microgate.com

>From paulkf@microgate.com Fri Oct  8 13:20:56 2004
Subject: [PATCH] serial receive lockup fix
From: Paul Fulghum <paulkf@microgate.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>

Fix lockup caused by serial driver not clearing
receive interrupt if flip buffer becomes full.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>



--- a/drivers/char/serial.c	2004-09-29 09:08:35.000000000 -0500
+++ b/drivers/char/serial.c	2004-09-29 09:09:07.000000000 -0500
@@ -573,8 +573,19 @@
 	do {
 		if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
 			tty->flip.tqueue.routine((void *) tty);
-			if (tty->flip.count >= TTY_FLIPBUF_SIZE)
+			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+				/* no room in flip buffer, discard rx FIFO contents to clear IRQ
+				 * *FIXME* Hardware with auto flow control
+				 * would benefit from leaving the data in the FIFO and
+				 * disabling the rx IRQ until space becomes available.
+				 */
+				do {
+					serial_inp(info, UART_RX);
+					icount->overrun++;
+					*status = serial_inp(info, UART_LSR);
+				} while ((*status & UART_LSR_DR) && (max_count-- > 0));
 				return;		// if TTY_DONT_FLIP is set
+			}
 		}
 		ch = serial_inp(info, UART_RX);
 		*tty->flip.char_buf_ptr = ch;




  parent reply	other threads:[~2004-10-23 13:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22 18:59 Linux 2.4.28-rc1 Marcelo Tosatti
2004-10-22 22:14 ` Jan Engelhardt
2004-10-23 10:43   ` Marcelo Tosatti
2004-10-23 13:48     ` [RESEND PATCH 2.4.28] delkin_cb new driver for Delkin Cardbus CF Adapter Mark Lord
2004-10-23 19:54     ` Linux 2.4.28-rc1 Jan Engelhardt
2004-10-23 13:30 ` Paul Fulghum [this message]
2004-10-23 11:39   ` Marcelo Tosatti
2004-10-24 14:07 ` [2.4 patch] add SCSI_SATA_ULI help text Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2004-10-26 14:02 Linux 2.4.28-rc1 O.Sezer
2004-10-26 20:33 ` Marcelo Tosatti
2004-10-26 23:28   ` Dave Jones
2004-10-27 12:40   ` O.Sezer
2004-10-27 14:29     ` Dave Jones
2004-10-27 15:29       ` O.Sezer
2004-10-27 18:58         ` Dave Jones
2004-10-28  9:54     ` Marcelo Tosatti
2004-10-28 13:28       ` O.Sezer
2004-10-28 14:29         ` O.Sezer
2004-10-28  1:19   ` Pete Zaitcev
2004-10-28  4:26   ` Jeff Garzik
2004-10-28 12:53   ` Russell King
2004-11-11 18:30   ` Roger Luethi
2004-10-27  2:52 ` Barry K. Nathan
2004-10-28 10:01   ` Marcelo Tosatti

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=1098538220.5960.2.camel@at2.pipehead.org \
    --to=paulkf@microgate.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /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).