]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Aug 2012 18:32:19 +0000 (11:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Aug 2012 18:32:19 +0000 (11:32 -0700)
added patches:
pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch

queue-3.4/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch b/queue-3.4/pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch
new file mode 100644 (file)
index 0000000..4cba462
--- /dev/null
@@ -0,0 +1,47 @@
+From 38f8eefccf3a23c4058a570fa2938a4f553cf8e0 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+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 <jason.wessel@windriver.com>
+
+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 <jason.wessel@windriver.com>
+Cc: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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)
index 1e525e9abc864691ad278b02b2f5e6892003e850..bc8f9c951751ba5c2103780a8254e861d41b2f0a 100644 (file)
@@ -22,6 +22,7 @@ xhci-increase-reset-timeout-for-renesas-720201-host.patch
 xhci-switch-ppt-ports-to-ehci-on-shutdown.patch
 xhci-fix-bug-after-deq-ptr-set-to-link-trb.patch
 usb-add-usb_vendor_and_interface_info-macro.patch
+pmac_zilog-kdb-fix-console-poll-hook-to-return-instead-of-loop.patch
 usb-support-the-new-interfaces-of-huawei-data-card-devices-in-option-driver.patch
 usb-option-add-zte-k5006-z.patch
 usb-ftdi_sio-add-vid-pid-for-kondo-serial-usb.patch