From: Greg Kroah-Hartman Date: Mon, 16 Mar 2015 11:44:32 +0000 (+0100) Subject: 3.10-stable patches X-Git-Tag: v3.10.72~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1aaf1df5531ed832d719078a337a0a4fe2f5be18;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.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 --- diff --git a/queue-3.10/clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch b/queue-3.10/clk-sunxi-support-factor-clocks-with-n-factor-starting-not-from-0.patch new file mode 100644 index 00000000000..e157b9c16e3 --- /dev/null +++ b/queue-3.10/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 +@@ -70,7 +70,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 *clk_register_factors(struct device *dev, const char *name, diff --git a/queue-3.10/fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch b/queue-3.10/fixed-invalid-assignment-of-64bit-mask-to-host-dma_boundary-for-scatter-gather-segment-boundary-limit.patch new file mode 100644 index 00000000000..1d396c50979 --- /dev/null +++ b/queue-3.10/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 +@@ -564,7 +564,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.10/series b/queue-3.10/series index c1232fcf461..5f4c7c4a61d 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -46,3 +46,6 @@ alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch sg-fix-read-error-reporting.patch ib-qib-do-not-write-eeprom.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-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.10/staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch b/queue-3.10/staging-comedi-comedi_compat32.c-fix-comedi_cmd-copy-back.patch new file mode 100644 index 00000000000..8990ba064fd --- /dev/null +++ b/queue-3.10/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 +@@ -270,7 +270,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)); +@@ -279,7 +279,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. */