From: Greg Kroah-Hartman Date: Fri, 17 Aug 2012 18:32:28 +0000 (-0700) Subject: 3.5-stable patches X-Git-Tag: v3.5.3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c012255e5d2c239fb4ba7ad61f61440e43907f24;p=thirdparty%2Fkernel%2Fstable-queue.git 3.5-stable patches added patches: pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch --- diff --git a/queue-3.5/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch b/queue-3.5/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch new file mode 100644 index 00000000000..4cba462f4b2 --- /dev/null +++ b/queue-3.5/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch @@ -0,0 +1,47 @@ +From 38f8eefccf3a23c4058a570fa2938a4f553cf8e0 Mon Sep 17 00:00:00 2001 +From: Jason Wessel +Date: Sun, 12 Aug 2012 07:16:43 -0500 +Subject: pmac_zilog,kdb: Fix console poll hook to return instead of loop + +From: Jason Wessel + +commit 38f8eefccf3a23c4058a570fa2938a4f553cf8e0 upstream. + +kdb <-> kgdb transitioning does not work properly with this UART +driver because the get character routine loops indefinitely as opposed +to returning NO_POLL_CHAR per the expectation of the KDB I/O driver +API. + +The symptom is a kernel hang when trying to switch debug modes. + +Signed-off-by: Jason Wessel +Cc: Alan Cox +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/pmac_zilog.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/drivers/tty/serial/pmac_zilog.c ++++ b/drivers/tty/serial/pmac_zilog.c +@@ -1348,10 +1348,16 @@ static int pmz_verify_port(struct uart_p + static int pmz_poll_get_char(struct uart_port *port) + { + struct uart_pmac_port *uap = (struct uart_pmac_port *)port; ++ int tries = 2; + +- while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0) +- udelay(5); +- return read_zsdata(uap); ++ while (tries) { ++ if ((read_zsreg(uap, R0) & Rx_CH_AV) != 0) ++ return read_zsdata(uap); ++ if (tries--) ++ udelay(5); ++ } ++ ++ return NO_POLL_CHAR; + } + + static void pmz_poll_put_char(struct uart_port *port, unsigned char c) diff --git a/queue-3.5/series b/queue-3.5/series index 2335a0b9e13..545c61b23b0 100644 --- a/queue-3.5/series +++ b/queue-3.5/series @@ -42,3 +42,4 @@ kvm-x86-apply-kvmclock-offset-to-guest-wall-clock-time.patch kvm-vmx-fix-ds-es-corruption-on-i386-with-preemption.patch kvm-x86-emulator-fix-byte-sized-movzx-movsx.patch kvm-vmx-fix-kvm_set_sregs-with-big-real-mode-segments.patch +pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch