]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2015 18:12:05 +0000 (11:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2015 18:12:05 +0000 (11:12 -0700)
added patches:
clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
pci-fix-ti816x-class-code-quirk.patch

queue-3.14/clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch [new file with mode: 0644]
queue-3.14/pci-fix-ti816x-class-code-quirk.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch b/queue-3.14/clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
new file mode 100644 (file)
index 0000000..dcd5f48
--- /dev/null
@@ -0,0 +1,34 @@
+From 3294bee87091be5f179474f6c39d1d87769635e2 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 29 Jul 2015 13:17:06 +0300
+Subject: clk: versatile: off by one in clk_sp810_timerclken_of_get()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.
+
+The ">" should be ">=" or we end up reading beyond the end of the array.
+
+Fixes: 6e973d2c4385 ('clk: vexpress: Add separate SP810 driver')
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Acked-by: Pawel Moll <pawel.moll@arm.com>
+Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/versatile/clk-sp810.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/clk/versatile/clk-sp810.c
++++ b/drivers/clk/versatile/clk-sp810.c
+@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_
+ {
+       struct clk_sp810 *sp810 = data;
+-      if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] >
+-                      ARRAY_SIZE(sp810->timerclken)))
++      if (WARN_ON(clkspec->args_count != 1 ||
++                  clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken)))
+               return NULL;
+       return sp810->timerclken[clkspec->args[0]].clk;
diff --git a/queue-3.14/pci-fix-ti816x-class-code-quirk.patch b/queue-3.14/pci-fix-ti816x-class-code-quirk.patch
new file mode 100644 (file)
index 0000000..5cf7e0c
--- /dev/null
@@ -0,0 +1,45 @@
+From d1541dc977d376406f4584d8eb055488655c98ec Mon Sep 17 00:00:00 2001
+From: Bjorn Helgaas <bhelgaas@google.com>
+Date: Fri, 19 Jun 2015 15:58:24 -0500
+Subject: PCI: Fix TI816X class code quirk
+
+From: Bjorn Helgaas <bhelgaas@google.com>
+
+commit d1541dc977d376406f4584d8eb055488655c98ec upstream.
+
+In fixup_ti816x_class(), we assigned "class = PCI_CLASS_MULTIMEDIA_VIDEO".
+But PCI_CLASS_MULTIMEDIA_VIDEO is only the two-byte base class/sub-class
+and needs to be shifted to make space for the low-order interface byte.
+
+Shift PCI_CLASS_MULTIMEDIA_VIDEO to set the correct class code.
+
+Fixes: 63c4408074cb ("PCI: Add quirk for setting valid class for TI816X Endpoint")
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+CC: Hemant Pedanekar <hemantp@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pci/quirks.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -2790,12 +2790,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IN
+ static void fixup_ti816x_class(struct pci_dev *dev)
+ {
++      u32 class = dev->class;
++
+       /* TI 816x devices do not have class code set when in PCIe boot mode */
+-      dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
+-      dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
++      dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8;
++      dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n",
++               class, dev->class);
+ }
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
+-                               PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
++                            PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
+ /* Some PCIe devices do not work reliably with the claimed maximum
+  * payload size supported.
index bf384e4bd253a07b68b33ff6a6546be4bef8e6b4..fc81378d750b5f51ea2eb00e812149cfebc52e9b 100644 (file)
@@ -7,3 +7,5 @@ iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch
 iio-add-inverse-unit-conversion-macros.patch
 iio-adis16480-fix-scale-factors.patch
 staging-comedi-adl_pci7x3x-fix-digital-output-on-pci-7230.patch
+clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
+pci-fix-ti816x-class-code-quirk.patch