From: Greg Kroah-Hartman Date: Mon, 16 Mar 2015 11:45:06 +0000 (+0100) Subject: 3.14-stable patches X-Git-Tag: v3.10.72~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5929babb81b21f8d28f52ce4e4c0c69844c13718;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch clk-zynq-force-cpu_2x-clock-to-be-ungated.patch fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch sunxi-clk-set-sun6i-pll1-n_start-1.patch --- diff --git a/queue-3.14/clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch b/queue-3.14/clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch new file mode 100644 index 00000000000..9531a3a43a0 --- /dev/null +++ b/queue-3.14/clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch @@ -0,0 +1,46 @@ +From 9a5e6c7eb5ccbb5f0d3a1dffce135f0a727f40e1 Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Thu, 26 Jun 2014 23:55:41 +0800 +Subject: clk: sunxi: Support factor clocks with N factor starting not from 0 + +From: Chen-Yu Tsai + +commit 9a5e6c7eb5ccbb5f0d3a1dffce135f0a727f40e1 upstream. + +The PLLs on newer Allwinner SoC's, such as the A31 and A23, have a +N multiplier factor that starts from 1, not 0. + +This patch adds an option to the factor clk driver's config data +structures to specify the base value of N. + +Signed-off-by: Chen-Yu Tsai +Acked-by: Maxime Ripard +Signed-off-by: Maxime Ripard +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/sunxi/clk-factors.c | 2 +- + drivers/clk/sunxi/clk-factors.h | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/clk/sunxi/clk-factors.c ++++ b/drivers/clk/sunxi/clk-factors.c +@@ -62,7 +62,7 @@ static unsigned long clk_factors_recalc_ + p = FACTOR_GET(config->pshift, config->pwidth, reg); + + /* Calculate the rate */ +- rate = (parent_rate * n * (k + 1) >> p) / (m + 1); ++ rate = (parent_rate * (n + config->n_start) * (k + 1) >> p) / (m + 1); + + return rate; + } +--- a/drivers/clk/sunxi/clk-factors.h ++++ b/drivers/clk/sunxi/clk-factors.h +@@ -15,6 +15,7 @@ struct clk_factors_config { + u8 mwidth; + u8 pshift; + u8 pwidth; ++ u8 n_start; + }; + + struct clk_factors { diff --git a/queue-3.14/clk-zynq-force-cpu_2x-clock-to-be-ungated.patch b/queue-3.14/clk-zynq-force-cpu_2x-clock-to-be-ungated.patch new file mode 100644 index 00000000000..56b3a876b3c --- /dev/null +++ b/queue-3.14/clk-zynq-force-cpu_2x-clock-to-be-ungated.patch @@ -0,0 +1,33 @@ +From 3dccfecdb867fe35b305a4e493ef5652b7d9d4cb Mon Sep 17 00:00:00 2001 +From: Soren Brinkmann +Date: Tue, 27 Jan 2015 11:05:27 -0800 +Subject: clk: zynq: Force CPU_2X clock to be ungated + +From: Soren Brinkmann + +commit 3dccfecdb867fe35b305a4e493ef5652b7d9d4cb upstream. + +The CPU_2X clock does not have a classical in-kernel user, but is, +amongst other things, required for OCM and debug access. Make sure this +clock is not mistakenly disabled during boot up by enabling it in the +platform's clock driver. + +Fixes: 0ee52b157b8e 'clk: zynq: Add clock controller driver' +Signed-off-by: Soren Brinkmann +Signed-off-by: Michael Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/zynq/clkc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/zynq/clkc.c ++++ b/drivers/clk/zynq/clkc.c +@@ -300,6 +300,7 @@ static void __init zynq_clk_setup(struct + clks[cpu_2x] = clk_register_gate(NULL, clk_output_name[cpu_2x], + "cpu_2x_div", CLK_IGNORE_UNUSED, SLCR_ARM_CLK_CTRL, + 26, 0, &armclk_lock); ++ clk_prepare_enable(clks[cpu_2x]); + + clk = clk_register_fixed_factor(NULL, "cpu_1x_div", "cpu_div", 0, 1, + 4 + 2 * tmp); diff --git a/queue-3.14/fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch b/queue-3.14/fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch new file mode 100644 index 00000000000..21ab1ff77b7 --- /dev/null +++ b/queue-3.14/fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch @@ -0,0 +1,34 @@ +From f76a610a8b4b6280eaedf48f3af9d5d74e418b66 Mon Sep 17 00:00:00 2001 +From: Minh Duc Tran +Date: Mon, 9 Feb 2015 18:54:09 +0000 +Subject: fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit. + +From: Minh Duc Tran + +commit f76a610a8b4b6280eaedf48f3af9d5d74e418b66 upstream. + +In reference to bug https://bugzilla.redhat.com/show_bug.cgi?id=1097141 +Assert is seen with AMD cpu whenever calling pci_alloc_consistent. + +[ 29.406183] ------------[ cut here ]------------ +[ 29.410505] kernel BUG at lib/iommu-helper.c:13! + +Signed-off-by: Minh Tran +Fixes: 6733b39a1301b0b020bbcbf3295852e93e624cb1 +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/be2iscsi/be_main.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/scsi/be2iscsi/be_main.c ++++ b/drivers/scsi/be2iscsi/be_main.c +@@ -581,7 +581,6 @@ static struct beiscsi_hba *beiscsi_hba_a + "beiscsi_hba_alloc - iscsi_host_alloc failed\n"); + return NULL; + } +- shost->dma_boundary = pcidev->dma_mask; + shost->max_id = BE2_MAX_SESSIONS; + shost->max_channel = 0; + shost->max_cmd_len = BEISCSI_MAX_CMD_LEN; diff --git a/queue-3.14/series b/queue-3.14/series index 58bae9f6c64..03ae9a188ba 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -72,3 +72,8 @@ ib-mlx4-fix-wrong-usage-of-ipv4-protocol-for-multicast-attach-detach.patch ib-core-fix-deadlock-on-uverbs-modify_qp-error-flow.patch ib-core-when-marshaling-ucma-path-from-user-space-clear-unused-fields.patch nilfs2-fix-potential-memory-overrun-on-inode.patch +fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch +clk-zynq-force-cpu_2x-clock-to-be-ungated.patch +sunxi-clk-set-sun6i-pll1-n_start-1.patch +clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch +staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch diff --git a/queue-3.14/staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch b/queue-3.14/staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch new file mode 100644 index 00000000000..2d4f9efac0c --- /dev/null +++ b/queue-3.14/staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch @@ -0,0 +1,61 @@ +From 42b8ce6f55facfa101462e694d33fc6bca471138 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 27 Jan 2015 18:16:51 +0000 +Subject: staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back + +From: Ian Abbott + +commit 42b8ce6f55facfa101462e694d33fc6bca471138 upstream. + +`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl. +This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd` +back to user-space. (This occurs when the low-level Comedi driver's +`do_cmdtest()` handler returns non-zero to indicate a problem with the +contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has +the `CMDF_BOGUS` flag set.) + +`compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible +version of the `COMEDI_CMD` ioctl. Currently, it never copies a 32-bit +compatible version of `struct comedi_cmd` back to user-space, which is +at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix +it, change `compat_cmd()` to copy a 32-bit compatible version of the +`struct comedi_cmd` back to user-space when the main ioctl handler +returns `-EAGAIN`. + +Signed-off-by: Ian Abbott +Reviewed-by: H Hartley Sweeten +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/comedi_compat32.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/staging/comedi/comedi_compat32.c ++++ b/drivers/staging/comedi/comedi_compat32.c +@@ -262,7 +262,7 @@ static int compat_cmd(struct file *file, + { + struct comedi_cmd __user *cmd; + struct comedi32_cmd_struct __user *cmd32; +- int rc; ++ int rc, err; + + cmd32 = compat_ptr(arg); + cmd = compat_alloc_user_space(sizeof(*cmd)); +@@ -271,7 +271,15 @@ static int compat_cmd(struct file *file, + if (rc) + return rc; + +- return translated_ioctl(file, COMEDI_CMD, (unsigned long)cmd); ++ rc = translated_ioctl(file, COMEDI_CMD, (unsigned long)cmd); ++ if (rc == -EAGAIN) { ++ /* Special case: copy cmd back to user. */ ++ err = put_compat_cmd(cmd32, cmd); ++ if (err) ++ rc = err; ++ } ++ ++ return rc; + } + + /* Handle 32-bit COMEDI_CMDTEST ioctl. */ diff --git a/queue-3.14/sunxi-clk-set-sun6i-pll1-n_start-1.patch b/queue-3.14/sunxi-clk-set-sun6i-pll1-n_start-1.patch new file mode 100644 index 00000000000..d7050b33348 --- /dev/null +++ b/queue-3.14/sunxi-clk-set-sun6i-pll1-n_start-1.patch @@ -0,0 +1,32 @@ +From 76820fcf7aa5a418b69cb7bed31b62d1feb1d6ad Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 24 Jan 2015 12:56:32 +0100 +Subject: sunxi: clk: Set sun6i-pll1 n_start = 1 + +From: Hans de Goede + +commit 76820fcf7aa5a418b69cb7bed31b62d1feb1d6ad upstream. + +For all pll-s on sun6i n == 0 means use a multiplier of 1, rather then 0 as +it means on sun4i / sun5i / sun7i. n_start = 1 is already correctly set +for sun6i pll6, but was missing for pll1, this commit fixes this. + +Cc: Chen-Yu Tsai +Signed-off-by: Hans de Goede +Signed-off-by: Maxime Ripard +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/sunxi/clk-sunxi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/clk/sunxi/clk-sunxi.c ++++ b/drivers/clk/sunxi/clk-sunxi.c +@@ -407,6 +407,7 @@ static struct clk_factors_config sun6i_a + .kwidth = 2, + .mshift = 0, + .mwidth = 2, ++ .n_start = 1, + }; + + static struct clk_factors_config sun4i_pll5_config = {