[PATCH] powerpc: fix up iSeries console after TTY layer buffering revamp
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 11 Jan 2006 02:51:22 +0000 (13:51 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 11 Jan 2006 03:49:52 +0000 (14:49 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/char/viocons.c

index bead38a4a68ad354303991e3f2a6d78968930888..faee5e7acaf7ae7707847bcb9f2ff8f044f41279 100644 (file)
@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
        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 HvLpEvent *event)
         * 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 HvLpEvent *event)
                        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);
 }