Commit 415c2e08 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Paul Mackerras

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

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7a0268fa
...@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event) ...@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
struct viocharlpevent *cevent = (struct viocharlpevent *)event; struct viocharlpevent *cevent = (struct viocharlpevent *)event;
struct port_info *pi; struct port_info *pi;
int index; int index;
int num_pushed;
u8 port = cevent->virtual_device; u8 port = cevent->virtual_device;
if (port >= VTTY_PORTS) { if (port >= VTTY_PORTS) {
...@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event) ...@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event)
* functionality will only work if built into the kernel and * functionality will only work if built into the kernel and
* then only if sysrq is enabled through the proc filesystem. * then only if sysrq is enabled through the proc filesystem.
*/ */
num_pushed = 0;
for (index = 0; index < cevent->len; index++) { for (index = 0; index < cevent->len; index++) {
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
if (sysrq_enabled) { if (sysrq_enabled) {
...@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event) ...@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event)
printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
break; break;
} }
num_pushed++;
} }
/* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ if (num_pushed)
if (tty->flip.count)
/* The next call resets flip.count when the data is flushed. */
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment