public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@redhat.com>
To: Joel Schopp <jschopp@austin.ibm.com>
Cc: Alan Cox <alan@redhat.com>, "Martin J. Bligh" <mbligh@mbligh.org>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.13-mm1
Date: Thu, 1 Sep 2005 17:16:47 -0400	[thread overview]
Message-ID: <20050901211647.GC25405@devserv.devel.redhat.com> (raw)
In-Reply-To: <43176AE8.8060105@austin.ibm.com>

On Thu, Sep 01, 2005 at 03:56:08PM -0500, Joel Schopp wrote:
> There are at least a couple other spots where flip got missed, after 
> fixing the count and flip problem mentioned these come up:
> 
> drivers/char/hvcs.c:459: error: structure has no member named `flip'
> drivers/char/hvcs.c:472: error: structure has no member named `flip'

Try the diff below although I suspect much of the extra logic can go
away and something like

	len = tty_buffer_request_root(tty, HVCS_BUFF_LEN);
	if(len) {
		len = hvc_get_chars(...., len);
		tty_insert_flip_string(tty, buf, len);
	}

is better.


--- drivers/char/hvcs.c~	2005-09-01 22:08:42.205515648 +0100
+++ drivers/char/hvcs.c	2005-09-01 22:08:42.206515496 +0100
@@ -456,12 +456,11 @@
 	/* remove the read masks */
 	hvcsd->todo_mask &= ~(HVCS_READ_MASK);
 
-	if ((tty->flip.count + HVCS_BUFF_LEN) < TTY_FLIPBUF_SIZE) {
+	if (tty_buffer_request_room(tty, HVCS_BUFF_LEN) >= HVCS_BUFF_LEN) {
 		got = hvc_get_chars(unit_address,
 				&buf[0],
 				HVCS_BUFF_LEN);
-		for (i=0;got && i<got;i++)
-			tty_insert_flip_char(tty, buf[i], TTY_NORMAL);
+		tty_insert_flip_string(tty, buf, got);
 	}
 
 	/* Give the TTY time to process the data we just sent. */
@@ -469,10 +468,9 @@
 		hvcsd->todo_mask |= HVCS_QUICK_READ;
 
 	spin_unlock_irqrestore(&hvcsd->lock, flags);
-	if (tty->flip.count) {
-		/* This is synch because tty->low_latency == 1 */
+	/* This is synch because tty->low_latency == 1 */
+	if(got)
 		tty_flip_buffer_push(tty);
-	}
 
 	if (!got) {
 		/* Do this _after_ the flip_buffer_push */

  reply	other threads:[~2005-09-01 21:17 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01 10:55 2.6.13-mm1 Andrew Morton
2005-09-01 14:22 ` 2.6.13-mm1 Martin J. Bligh
2005-09-01 14:50   ` 2.6.13-mm1 Alan Cox
2005-09-01 20:56     ` 2.6.13-mm1 Joel Schopp
2005-09-01 21:16       ` Alan Cox [this message]
2005-09-01 21:26         ` 2.6.13-mm1 Joel Schopp
2005-09-01 21:44           ` 2.6.13-mm1 Alan Cox
2005-09-12 16:34             ` tty patches in 2.6.13-mm3 (was Re: 2.6.13-mm1) serue
2005-09-12 16:55               ` Joel Schopp
2005-09-12 17:04             ` 2.6.13-mm1 serue
2005-09-01 14:59   ` 2.6.13-mm1 Adrian Bunk
2005-09-01 15:01 ` [PATCH] mips: remove typedef from struct flock Yoichi Yuasa
2005-09-01 15:38 ` 2.6.13-mm1 Dominik Karall
2005-09-01 16:09   ` 2.6.13-mm1 John Stoffel
2005-09-01 16:28     ` 2.6.13-mm1 Dominik Karall
2005-09-01 17:34       ` 2.6.13-mm1 John Stoffel
2005-09-01 18:05         ` 2.6.13-mm1 Dominik Karall
2005-09-01 18:27           ` 2.6.13-mm1 John Stoffel
2005-09-01 15:44 ` [PATCH] : struct dentry : place d_hash close to d_parent and d_name to speedup lookups Eric Dumazet
2005-09-01 15:48   ` Eric Dumazet
2005-09-01 17:36     ` Dipankar Sarma
2005-09-01 19:52       ` Eric Dumazet
2005-09-01 17:41 ` 2.6.13-mm1 - drivers/isdn/i4l/isdn_tty broken Damir Perisa
2005-09-01 21:06   ` Alan Cox
2005-09-02  1:05   ` 2.6.13-mm1 - drivers/serial/jsm/jsm_tty broken too Damir Perisa
2005-09-01 21:14 ` 2.6.13-mm1: PCMCIA problem Rafael J. Wysocki
2005-09-01 21:28   ` Andrew Morton
2005-09-02  8:30     ` Rafael J. Wysocki
2005-09-02  8:37       ` Rafael J. Wysocki
2005-09-02 10:43         ` Pavel Machek
2005-09-02 10:58           ` Rafael J. Wysocki
2005-09-02 11:09           ` Andrew Morton
2005-09-02 11:45             ` 2.6.13-mm1: swsusp problem (was: PCMCIA problem) Rafael J. Wysocki
2005-09-02 14:17               ` Rafael J. Wysocki
2005-09-04 14:29             ` 2.6.13-mm1: PCMCIA problem Pavel Machek
2005-09-01 22:19 ` 2.6.13-mm1: broken drivers/video/sis/Makefile Adrian Bunk
2005-09-01 23:24   ` Thomas Winischhofer
2005-09-01 23:25 ` 2.6.13-mm1: misc mwave issues Adrian Bunk
2005-09-02 12:36   ` Alan Cox
2005-09-02 13:57 ` 2.6.13-mm1 Benjamin LaHaise
2005-09-02 20:57   ` 2.6.13-mm1 Andrew Morton
2005-09-06 11:50     ` 2.6.13-mm1 Benjamin LaHaise
2005-09-02 14:30 ` 2.6.13-mm1 Alexander Nyberg
2005-09-02 14:40   ` 2.6.13-mm1 Zwane Mwaikambo
2005-09-03 12:21 ` 2.6.13-mm1 Adrian Bunk
2005-09-03 19:34   ` 2.6.13-mm1 Andrew Morton
2005-09-03 19:54     ` 2.6.13-mm1 Adrian Bunk
2005-09-03 20:06       ` 2.6.13-mm1 Andrew Morton
2005-09-04 20:00         ` 2.6.13-mm1 Adrian Bunk
2005-09-04 21:24         ` 2.6.13-mm1 Jesper Juhl
2005-09-04 21:30           ` 2.6.13-mm1 Andrew Morton
2005-09-04 21:36             ` 2.6.13-mm1 Jesper Juhl
2005-09-07  0:05             ` 2.6.13-mm1 Paul Jackson
2005-09-07  0:32               ` 2.6.13-mm1 Andrew Morton
2005-09-07  0:44               ` 2.6.13-mm1 Jesper Juhl
2005-09-07  2:38                 ` 2.6.13-mm1 Paul Jackson
2005-09-04 10:26 ` 2.6.13-mm1 Alexander Nyberg
  -- strict thread matches above, loose matches on Subject: below --
2005-09-01 18:21 2.6.13-mm1 J.A. Magallon
2005-09-01 22:00 ` 2.6.13-mm1 Adrian Bunk
     [not found] <fa.hqupr0d.1u3af35@ifi.uio.no>
2005-09-02  1:39 ` 2.6.13-mm1 Reuben Farrelly
2005-09-02  1:56   ` 2.6.13-mm1 J.A. Magallon
2005-09-02  2:06     ` 2.6.13-mm1 Andrew Morton
2005-09-02 15:53       ` 2.6.13-mm1 J.A. Magallon
2005-09-02 21:45         ` 2.6.13-mm1 Andrew Morton
2005-09-02 22:55           ` 2.6.13-mm1 J.A. Magallon
2005-09-03  0:15           ` 2.6.13-mm1 gcoady
2005-09-02  2:04   ` 2.6.13-mm1 Andrew Morton

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=20050901211647.GC25405@devserv.devel.redhat.com \
    --to=alan@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@mbligh.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