aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/hvc_console.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 4b776f4eb46..46508a73706 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -254,13 +254,17 @@ static void hvc_kick(void)
254 wake_up_process(hvc_task); 254 wake_up_process(hvc_task);
255} 255}
256 256
257static int hvc_poll(struct hvc_struct *hp);
258
257/* 259/*
258 * NOTE: This API isn't used if the console adapter doesn't support interrupts. 260 * NOTE: This API isn't used if the console adapter doesn't support interrupts.
259 * In this case the console is poll driven. 261 * In this case the console is poll driven.
260 */ 262 */
261static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance, struct pt_regs *regs) 263static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
262{ 264{
263 hvc_kick(); 265 /* if hvc_poll request a repoll, then kick the hvcd thread */
266 if (hvc_poll(dev_instance))
267 hvc_kick();
264 return IRQ_HANDLED; 268 return IRQ_HANDLED;
265} 269}
266 270
@@ -598,8 +602,8 @@ static int hvc_poll(struct hvc_struct *hp)
598 602
599 /* 603 /*
600 * Account for the total amount read in one loop, and if above 604 * Account for the total amount read in one loop, and if above
601 * 64 bytes, we do a quick schedule loop to let the tty grok the 605 * 64 bytes, we do a quick schedule loop to let the tty grok
602 * data and eventually throttle us. 606 * the data and eventually throttle us.
603 */ 607 */
604 read_total += n; 608 read_total += n;
605 if (read_total >= 64) { 609 if (read_total >= 64) {