[PATCH] powerpc: fix up iSeries console after TTY layer buffering revamp

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 11 13:51:22 EST 2006


Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
---

 drivers/char/viocons.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Paulus, can you please appply and send upstream, thanks?

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

15482eeb8f78fca3b6256d7ac340aabe9c787270
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index cb82ebf..f33edb2 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEve
 	struct viocharlpevent *cevent = (struct viocharlpevent *)event;
 	struct port_info *pi;
 	int index;
+	int num_pushed;
 	u8 port = cevent->virtual_device;
 
 	if (port >= VTTY_PORTS) {
@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEve
 	 * functionality will only work if built into the kernel and
 	 * then only if sysrq is enabled through the proc filesystem.
 	 */
+	num_pushed = 0;
 	for (index = 0; index < cevent->len; index++) {
 #ifdef CONFIG_MAGIC_SYSRQ
 		if (sysrq_enabled) {
@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEve
 			printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
 			break;
 		}
+		num_pushed++;
 	}
 
-	/* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */
-	if (tty->flip.count)
-		/* The next call resets flip.count when the data is flushed. */
+	if (num_pushed)
 		tty_flip_buffer_push(tty);
 }
 
-- 
1.0.6



More information about the Linuxppc64-dev mailing list