aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/viocons.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index bead38a4a68a..faee5e7acaf7 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
904 struct viocharlpevent *cevent = (struct viocharlpevent *)event; 904 struct viocharlpevent *cevent = (struct viocharlpevent *)event;
905 struct port_info *pi; 905 struct port_info *pi;
906 int index; 906 int index;
907 int num_pushed;
907 u8 port = cevent->virtual_device; 908 u8 port = cevent->virtual_device;
908 909
909 if (port >= VTTY_PORTS) { 910 if (port >= VTTY_PORTS) {
@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event)
964 * functionality will only work if built into the kernel and 965 * functionality will only work if built into the kernel and
965 * then only if sysrq is enabled through the proc filesystem. 966 * then only if sysrq is enabled through the proc filesystem.
966 */ 967 */
968 num_pushed = 0;
967 for (index = 0; index < cevent->len; index++) { 969 for (index = 0; index < cevent->len; index++) {
968#ifdef CONFIG_MAGIC_SYSRQ 970#ifdef CONFIG_MAGIC_SYSRQ
969 if (sysrq_enabled) { 971 if (sysrq_enabled) {
@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event)
997 printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); 999 printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
998 break; 1000 break;
999 } 1001 }
1002 num_pushed++;
1000 } 1003 }
1001 1004
1002 /* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ 1005 if (num_pushed)
1003 if (tty->flip.count)
1004 /* The next call resets flip.count when the data is flushed. */
1005 tty_flip_buffer_push(tty); 1006 tty_flip_buffer_push(tty);
1006} 1007}
1007 1008