From: Greg Kroah-Hartman Date: Wed, 16 Sep 2015 18:12:05 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.10.89~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c76f0c9d1f47179e147d54701ea9add992850964;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch pci-fix-ti816x-class-code-quirk.patch --- 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 index 00000000000..dcd5f48d967 --- /dev/null +++ b/queue-3.14/clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch @@ -0,0 +1,34 @@ +From 3294bee87091be5f179474f6c39d1d87769635e2 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 29 Jul 2015 13:17:06 +0300 +Subject: clk: versatile: off by one in clk_sp810_timerclken_of_get() + +From: Dan Carpenter + +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 +Acked-by: Pawel Moll +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5cf7e0c8823 --- /dev/null +++ b/queue-3.14/pci-fix-ti816x-class-code-quirk.patch @@ -0,0 +1,45 @@ +From d1541dc977d376406f4584d8eb055488655c98ec Mon Sep 17 00:00:00 2001 +From: Bjorn Helgaas +Date: Fri, 19 Jun 2015 15:58:24 -0500 +Subject: PCI: Fix TI816X class code quirk + +From: Bjorn Helgaas + +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 +CC: Hemant Pedanekar +Signed-off-by: Greg Kroah-Hartman + +--- + 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. diff --git a/queue-3.14/series b/queue-3.14/series index bf384e4bd25..fc81378d750 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -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