]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Sep 2012 20:57:47 +0000 (13:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Sep 2012 20:57:47 +0000 (13:57 -0700)
added patches:
media-avoid-sysfs-oops-when-an-rc_dev-s-raw-device-is-absent.patch
pch_uart-fix-missing-break-for-16-byte-fifo.patch
pch_uart-fix-parity-setting-issue.patch
pch_uart-fix-rx-error-interrupt-setting-issue.patch

queue-3.0/media-avoid-sysfs-oops-when-an-rc_dev-s-raw-device-is-absent.patch [new file with mode: 0644]
queue-3.0/pch_uart-fix-missing-break-for-16-byte-fifo.patch [new file with mode: 0644]
queue-3.0/pch_uart-fix-parity-setting-issue.patch [new file with mode: 0644]
queue-3.0/pch_uart-fix-rx-error-interrupt-setting-issue.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/media-avoid-sysfs-oops-when-an-rc_dev-s-raw-device-is-absent.patch b/queue-3.0/media-avoid-sysfs-oops-when-an-rc_dev-s-raw-device-is-absent.patch
new file mode 100644 (file)
index 0000000..d1bbd7d
--- /dev/null
@@ -0,0 +1,51 @@
+From 720bb6436ff30fccad05cf5bdf961ea5b1f5686d Mon Sep 17 00:00:00 2001
+From: Douglas Bagnall <douglas@paradise.net.nz>
+Date: Fri, 6 Jul 2012 23:27:57 -0300
+Subject: media: Avoid sysfs oops when an rc_dev's raw device is absent
+
+From: Douglas Bagnall <douglas@paradise.net.nz>
+
+commit 720bb6436ff30fccad05cf5bdf961ea5b1f5686d upstream.
+
+For some reason, when the lirc daemon learns that a usb remote control
+has been unplugged, it wants to read the sysfs attributes of the
+disappearing device. This is useful for uncovering transient
+inconsistencies, but less so for keeping the system running when such
+inconsistencies exist.
+
+Under some circumstances (like every time I unplug my dvb stick from
+my laptop), lirc catches an rc_dev whose raw event handler has been
+removed (presumably by ir_raw_event_unregister), and proceeds to
+interrogate the raw protocols supported by the NULL pointer.
+
+This patch avoids the NULL dereference, and ignores the issue of how
+this state of affairs came about in the first place.
+
+Version 2 incorporates changes recommended by Mauro Carvalho Chehab
+(-ENODEV instead of -EINVAL, and a signed-off-by).
+
+Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/rc/rc-main.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/rc/rc-main.c
++++ b/drivers/media/rc/rc-main.c
+@@ -772,10 +772,11 @@ static ssize_t show_protocols(struct dev
+       if (dev->driver_type == RC_DRIVER_SCANCODE) {
+               enabled = dev->rc_map.rc_type;
+               allowed = dev->allowed_protos;
+-      } else {
++      } else if (dev->raw) {
+               enabled = dev->raw->enabled_protocols;
+               allowed = ir_raw_get_allowed_protocols();
+-      }
++      } else
++              return -ENODEV;
+       IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
+                  (long long)allowed,
diff --git a/queue-3.0/pch_uart-fix-missing-break-for-16-byte-fifo.patch b/queue-3.0/pch_uart-fix-missing-break-for-16-byte-fifo.patch
new file mode 100644 (file)
index 0000000..acaa447
--- /dev/null
@@ -0,0 +1,31 @@
+From 9bc03743fff0770dc5a5324ba92e67cc377f16ca Mon Sep 17 00:00:00 2001
+From: Alan Cox <alan@linux.intel.com>
+Date: Mon, 2 Jul 2012 18:51:38 +0100
+Subject: pch_uart: Fix missing break for 16 byte fifo
+
+From: Alan Cox <alan@linux.intel.com>
+
+commit 9bc03743fff0770dc5a5324ba92e67cc377f16ca upstream.
+
+Otherwise we fall back to the wrong value.
+
+Reported-by: <dcb314@hotmail.com>
+Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44091
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/pch_uart.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/tty/serial/pch_uart.c
++++ b/drivers/tty/serial/pch_uart.c
+@@ -1161,6 +1161,7 @@ static int pch_uart_startup(struct uart_
+               break;
+       case 16:
+               fifo_size = PCH_UART_HAL_FIFO16;
++              break;
+       case 1:
+       default:
+               fifo_size = PCH_UART_HAL_FIFO_DIS;
diff --git a/queue-3.0/pch_uart-fix-parity-setting-issue.patch b/queue-3.0/pch_uart-fix-parity-setting-issue.patch
new file mode 100644 (file)
index 0000000..f84e999
--- /dev/null
@@ -0,0 +1,32 @@
+From 38bd2a1ac736901d1cf4971c78ef952ba92ef78b Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Fri, 6 Jul 2012 17:19:43 +0900
+Subject: pch_uart: Fix parity setting issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit 38bd2a1ac736901d1cf4971c78ef952ba92ef78b upstream.
+
+Parity Setting value is reverse.
+E.G. In case of setting ODD parity, EVEN value is set.
+This patch inverts "if" condition.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/pch_uart.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/pch_uart.c
++++ b/drivers/tty/serial/pch_uart.c
+@@ -1263,7 +1263,7 @@ static void pch_uart_set_termios(struct
+               stb = PCH_UART_HAL_STB1;
+       if (termios->c_cflag & PARENB) {
+-              if (!(termios->c_cflag & PARODD))
++              if (termios->c_cflag & PARODD)
+                       parity = PCH_UART_HAL_PARITY_ODD;
+               else
+                       parity = PCH_UART_HAL_PARITY_EVEN;
diff --git a/queue-3.0/pch_uart-fix-rx-error-interrupt-setting-issue.patch b/queue-3.0/pch_uart-fix-rx-error-interrupt-setting-issue.patch
new file mode 100644 (file)
index 0000000..138652b
--- /dev/null
@@ -0,0 +1,81 @@
+From 9539dfb7ac1c84522fe1f79bb7dac2990f3de44a Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Fri, 6 Jul 2012 17:19:42 +0900
+Subject: pch_uart: Fix rx error interrupt setting issue
+
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+
+commit 9539dfb7ac1c84522fe1f79bb7dac2990f3de44a upstream.
+
+Rx Error interrupt(E.G. parity error) is not enabled.
+So, when parity error occurs, error interrupt is not occurred.
+As a result, the received data is not dropped.
+
+This patch adds enable/disable rx error interrupt code.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/pch_uart.c |   18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+--- a/drivers/tty/serial/pch_uart.c
++++ b/drivers/tty/serial/pch_uart.c
+@@ -754,7 +754,8 @@ static void pch_dma_rx_complete(void *ar
+               tty_flip_buffer_push(tty);
+       tty_kref_put(tty);
+       async_tx_ack(priv->desc_rx);
+-      pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT);
++      pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
++                                          PCH_UART_HAL_RX_ERR_INT);
+ }
+ static void pch_dma_tx_complete(void *arg)
+@@ -809,7 +810,8 @@ static int handle_rx_to(struct eg20t_por
+       int rx_size;
+       int ret;
+       if (!priv->start_rx) {
+-              pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT);
++              pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
++                                                   PCH_UART_HAL_RX_ERR_INT);
+               return 0;
+       }
+       buf = &priv->rxbuf;
+@@ -1071,11 +1073,13 @@ static irqreturn_t pch_uart_interrupt(in
+               case PCH_UART_IID_RDR:  /* Received Data Ready */
+                       if (priv->use_dma) {
+                               pch_uart_hal_disable_interrupt(priv,
+-                                                      PCH_UART_HAL_RX_INT);
++                                              PCH_UART_HAL_RX_INT |
++                                              PCH_UART_HAL_RX_ERR_INT);
+                               ret = dma_handle_rx(priv);
+                               if (!ret)
+                                       pch_uart_hal_enable_interrupt(priv,
+-                                                      PCH_UART_HAL_RX_INT);
++                                              PCH_UART_HAL_RX_INT |
++                                              PCH_UART_HAL_RX_ERR_INT);
+                       } else {
+                               ret = handle_rx(priv);
+                       }
+@@ -1199,7 +1203,8 @@ static void pch_uart_stop_rx(struct uart
+       struct eg20t_port *priv;
+       priv = container_of(port, struct eg20t_port, port);
+       priv->start_rx = 0;
+-      pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT);
++      pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_RX_INT |
++                                           PCH_UART_HAL_RX_ERR_INT);
+       priv->int_dis_flag = 1;
+ }
+@@ -1293,7 +1298,8 @@ static int pch_uart_startup(struct uart_
+               pch_request_dma(port);
+       priv->start_rx = 1;
+-      pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT);
++      pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
++                                          PCH_UART_HAL_RX_ERR_INT);
+       uart_update_timeout(port, CS8, default_baud);
+       return 0;
index a1a99b44634b2ae540fd06e396df87ed1bf7ea38..7bea516221b1526113fda174d55feb8e71778126 100644 (file)
@@ -112,3 +112,7 @@ drop_monitor-dont-sleep-in-atomic-context.patch
 time-improve-sanity-checking-of-timekeeping-inputs.patch
 time-avoid-making-adjustments-if-we-haven-t-accumulated-anything.patch
 time-move-ktime_t-overflow-checking-into-timespec_valid_strict.patch
+media-avoid-sysfs-oops-when-an-rc_dev-s-raw-device-is-absent.patch
+pch_uart-fix-missing-break-for-16-byte-fifo.patch
+pch_uart-fix-rx-error-interrupt-setting-issue.patch
+pch_uart-fix-parity-setting-issue.patch