Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17862
b: refs/heads/master
c: 415c2e0
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Jan 11, 2006
1 parent f58cfa7 commit 7cd1bc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a0268fa1a3613f2c526a9b3058701b277f6abe1
refs/heads/master: 415c2e083a85f0daf6cbb4988691ac3ea9279509
7 changes: 4 additions & 3 deletions trunk/drivers/char/viocons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 7cd1bc5

Please sign in to comment.