[PATCH 14/37] sh,sh-sci: Use NO_POLL_CHAR in the SCIF polled console code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jason Wessel
Date: Wednesday, December 23, 2009 - 2:19 pm

The sci_poll_get_char() needs to return immediately if there is no
input from the chip to process, and must return a value of
NO_POLL_CHAR.

This allows kgdboc to process multiple polled devices while kgdb is
active.

CC: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 drivers/serial/sh-sci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 68c7f6c..ab020eb 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -126,7 +126,11 @@ static int sci_poll_get_char(struct uart_port *port)
 			handle_error(port);
 			continue;
 		}
-	} while (!(status & SCxSR_RDxF(port)));
+		break;
+	} while (1);
+
+	if (!(status & SCxSR_RDxF(port)))
+		return NO_POLL_CHAR;
 
 	c = sci_in(port, SCxRDR);
 
-- 
1.6.4.rc1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 04/37] Separate the gdbstub from the debug core, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 12/37] kgdb: core changes to support kdb, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 14/37] sh,sh-sci: Use NO_POLL_CHAR in the SCIF poll ..., Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 18/37] kgdb: remove post_primary_code references, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 19/37] x86,kgdb: Add low level debug hook, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 32/37] kms,kdb: Force unblank a console device, Jason Wessel, (Wed Dec 23, 2:19 pm)
[PATCH 36/37] drm,i915 - atomic mutex hacks, Jason Wessel, (Wed Dec 23, 2:43 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end, Andi Kleen, (Wed Dec 23, 6:28 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end, Peter Zijlstra, (Thu Dec 24, 4:01 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Peter Zijlstra, (Thu Dec 24, 4:04 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Peter Zijlstra, (Thu Dec 24, 4:16 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Thu Dec 24, 4:55 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Peter Zijlstra, (Thu Dec 24, 5:01 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Thu Dec 24, 8:57 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Mike Frysinger, (Sat Dec 26, 2:34 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Mon Dec 28, 9:33 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Peter Zijlstra, (Mon Dec 28, 9:55 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Mon Dec 28, 10:15 am)
Re: [PATCH 05/37] kdb: core for kgdb back end, Jason Wessel, (Mon Dec 28, 3:36 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end, Andi Kleen, (Mon Dec 28, 4:37 pm)