From: Greg Kroah-Hartman Date: Fri, 28 Oct 2016 18:20:22 +0000 (-0400) Subject: 4.8-stable patches X-Git-Tag: v4.4.29~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7823ab4f893d138bfdd6f13855abb3a22c1d6267;p=thirdparty%2Fkernel%2Fstable-queue.git 4.8-stable patches added patches: asoc-dapm-fix-kcontrol-creation-for-output-driver-widget.patch asoc-dapm-fix-possible-uninitialized-variable-in-snd_soc_dapm_get_volsw.patch asoc-dapm-fix-value-setting-for-_enum_double-mux-s-second-channel.patch asoc-sst-bxt-da7219_max98357a-fix-obsoleted-initializers-for-array.patch asoc-sst-bxt-rt298-fix-obsoleted-initializers-for-array.patch asoc-topology-fix-error-return-code-in-soc_tplg_dapm_widget_create.patch dmaengine-ipu-remove-bogus-no_irq-reference.patch hwrng-omap-only-fail-if-pm_runtime_get_sync-returns-0.patch ib-hfi1-move-iowait_init-to-priv-allocate.patch ib-mlx5-fix-steering-resource-leak.patch ib-qib-remove-qpt_mask-global.patch ib-rdmavt-correct-sparse-annotation.patch iio-ad5755-fix-off-by-one-on-devnr-limit-check.patch iio-light-us5182d-add-missing-error-code-assignment-before-test.patch mm-hugetlb-check-for-reserved-hugepages-during-memory-offline.patch power-bq24257-fix-use-of-uninitialized-pointer-bq-charger.patch staging-android-ion-hisi-fix-dependencies.patch staging-ks7010-declare-private-functions-static.patch staging-ks7010-fix-wait_for_completion_interruptible_timeout-return-handling.patch staging-r8188eu-fix-scheduling-while-atomic-splat.patch staging-sm750fb-correctly-set-clock_phase-bit-of-display-controller.patch --- diff --git a/queue-4.8/asoc-dapm-fix-kcontrol-creation-for-output-driver-widget.patch b/queue-4.8/asoc-dapm-fix-kcontrol-creation-for-output-driver-widget.patch new file mode 100644 index 00000000000..d7cd051dc84 --- /dev/null +++ b/queue-4.8/asoc-dapm-fix-kcontrol-creation-for-output-driver-widget.patch @@ -0,0 +1,41 @@ +From a3930ed060df4ccf2a06cf0b68738dec3e6ff89a Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Sat, 27 Aug 2016 19:28:00 +0800 +Subject: ASoC: dapm: Fix kcontrol creation for output driver widget + +From: Chen-Yu Tsai + +commit a3930ed060df4ccf2a06cf0b68738dec3e6ff89a upstream. + +Commit d88429a695a4 ("ASoC: dapm: Add output driver widget") added +the snd_soc_dapm_out_drv ID for the output driver widget, which is +the same as the PGA widget, with a later power sequence number. + +Commit 19a2557b76d6 ("ASoC: dapm: Add kcontrol support for PGAs") +then added kcontrol support for PGA widgets, but failed to account +for output driver widgets. Attempts to use kcontrols with output +driver widgets result in silent failures, with the developer having +little idea about what went on. + +Add snd_soc_dapm_out_drv to the switch/case block under snd_soc_dapm_pga +in dapm_create_or_share_kcontrol, since they are essentially the same. + +Fixes: 19a2557b76d6 (ASoC: dapm: Add kcontrol support for PGAs) +Signed-off-by: Chen-Yu Tsai +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-dapm.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -823,6 +823,7 @@ static int dapm_create_or_share_kcontrol + case snd_soc_dapm_switch: + case snd_soc_dapm_mixer: + case snd_soc_dapm_pga: ++ case snd_soc_dapm_out_drv: + wname_in_long_name = true; + kcname_in_long_name = true; + break; diff --git a/queue-4.8/asoc-dapm-fix-possible-uninitialized-variable-in-snd_soc_dapm_get_volsw.patch b/queue-4.8/asoc-dapm-fix-possible-uninitialized-variable-in-snd_soc_dapm_get_volsw.patch new file mode 100644 index 00000000000..014bcdc017f --- /dev/null +++ b/queue-4.8/asoc-dapm-fix-possible-uninitialized-variable-in-snd_soc_dapm_get_volsw.patch @@ -0,0 +1,42 @@ +From 01ad5e7de67b408d9b48b437b06a9938ddf460b5 Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Sat, 27 Aug 2016 19:27:58 +0800 +Subject: ASoC: dapm: Fix possible uninitialized variable in snd_soc_dapm_get_volsw() + +From: Chen-Yu Tsai + +commit 01ad5e7de67b408d9b48b437b06a9938ddf460b5 upstream. + +If soc_dapm_read() fails, val will be uninitialized, and bogus values +will be written later: + + ret = soc_dapm_read(dapm, reg, &val); + val = (val >> shift) & mask; + +However, the compiler does not give a warning. Return on error before +val is really used to avoid this. + +This is similar to the commit 6912831623c5 ("ASoC: dapm: Fix +uninitialized variable in snd_soc_dapm_get_enum_double()") + +Fixes: ce0fc93ae56e (ASoC: Add DAPM support at the component level) +Signed-off-by: Chen-Yu Tsai +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-dapm.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -3049,6 +3049,9 @@ int snd_soc_dapm_get_volsw(struct snd_kc + } + mutex_unlock(&card->dapm_mutex); + ++ if (ret) ++ return ret; ++ + if (invert) + ucontrol->value.integer.value[0] = max - val; + else diff --git a/queue-4.8/asoc-dapm-fix-value-setting-for-_enum_double-mux-s-second-channel.patch b/queue-4.8/asoc-dapm-fix-value-setting-for-_enum_double-mux-s-second-channel.patch new file mode 100644 index 00000000000..737cd33e00d --- /dev/null +++ b/queue-4.8/asoc-dapm-fix-value-setting-for-_enum_double-mux-s-second-channel.patch @@ -0,0 +1,35 @@ +From 071133a209354f39d4e5785d5a6a390e03241841 Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Sat, 27 Aug 2016 19:27:59 +0800 +Subject: ASoC: dapm: Fix value setting for _ENUM_DOUBLE MUX's second channel + +From: Chen-Yu Tsai + +commit 071133a209354f39d4e5785d5a6a390e03241841 upstream. + +The value for the second channel in _ENUM_DOUBLE (double channel) MUXs +is not correctly updated, due to using the wrong bit shift. + +Use the correct bit shift, so both channels toggle together. + +Fixes: 3727b4968453 (ASoC: dapm: Consolidate MUXs and value MUXs) +Signed-off-by: Chen-Yu Tsai +Reviewed-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-dapm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -3203,7 +3203,7 @@ int snd_soc_dapm_put_enum_double(struct + if (e->shift_l != e->shift_r) { + if (item[1] > e->items) + return -EINVAL; +- val |= snd_soc_enum_item_to_val(e, item[1]) << e->shift_l; ++ val |= snd_soc_enum_item_to_val(e, item[1]) << e->shift_r; + mask |= e->mask << e->shift_r; + } + diff --git a/queue-4.8/asoc-sst-bxt-da7219_max98357a-fix-obsoleted-initializers-for-array.patch b/queue-4.8/asoc-sst-bxt-da7219_max98357a-fix-obsoleted-initializers-for-array.patch new file mode 100644 index 00000000000..610d3216418 --- /dev/null +++ b/queue-4.8/asoc-sst-bxt-da7219_max98357a-fix-obsoleted-initializers-for-array.patch @@ -0,0 +1,85 @@ +From 43d443dc257c00ef3a3f940b6abfb7537c4fcbe8 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Tue, 27 Sep 2016 07:45:09 +0900 +Subject: ASoC: sst-bxt-da7219_max98357a: fix obsoleted initializers for array + +From: Takashi Sakamoto + +commit 43d443dc257c00ef3a3f940b6abfb7537c4fcbe8 upstream. + +Sparse reports below warnings. + +bxt_da7219_max98357a.c:250:9: warning: obsolete array initializer, use C99 syntax +bxt_da7219_max98357a.c:275:9: warning: obsolete array initializer, use C99 syntax +bxt_da7219_max98357a.c:290:9: warning: obsolete array initializer, use C99 syntax +bxt_da7219_max98357a.c:304:9: warning: obsolete array initializer, use C99 syntax +bxt_da7219_max98357a.c:317:9: warning: obsolete array initializer, use C99 syntax + +There's no need to use obsoleted way. This commit fixes it. + +Fixes: 723bad3fef8b (ASoC: Intel: Add Broxton-P Dialog Maxim machine driver) +Signed-off-by: Takashi Sakamoto +Acked-by: Vinod Koul +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c ++++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c +@@ -255,7 +255,7 @@ static struct snd_soc_ops broxton_da7219 + /* broxton digital audio interface glue - connects codec <--> CPU */ + static struct snd_soc_dai_link broxton_dais[] = { + /* Front End DAI links */ +- [BXT_DPCM_AUDIO_PB] ++ [BXT_DPCM_AUDIO_PB] = + { + .name = "Bxt Audio Port", + .stream_name = "Audio", +@@ -271,7 +271,7 @@ static struct snd_soc_dai_link broxton_d + .dpcm_playback = 1, + .ops = &broxton_da7219_fe_ops, + }, +- [BXT_DPCM_AUDIO_CP] ++ [BXT_DPCM_AUDIO_CP] = + { + .name = "Bxt Audio Capture Port", + .stream_name = "Audio Record", +@@ -286,7 +286,7 @@ static struct snd_soc_dai_link broxton_d + .dpcm_capture = 1, + .ops = &broxton_da7219_fe_ops, + }, +- [BXT_DPCM_AUDIO_REF_CP] ++ [BXT_DPCM_AUDIO_REF_CP] = + { + .name = "Bxt Audio Reference cap", + .stream_name = "Refcap", +@@ -300,7 +300,7 @@ static struct snd_soc_dai_link broxton_d + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_HDMI1_PB] ++ [BXT_DPCM_AUDIO_HDMI1_PB] = + { + .name = "Bxt HDMI Port1", + .stream_name = "Hdmi1", +@@ -313,7 +313,7 @@ static struct snd_soc_dai_link broxton_d + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_HDMI2_PB] ++ [BXT_DPCM_AUDIO_HDMI2_PB] = + { + .name = "Bxt HDMI Port2", + .stream_name = "Hdmi2", +@@ -326,7 +326,7 @@ static struct snd_soc_dai_link broxton_d + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_HDMI3_PB] ++ [BXT_DPCM_AUDIO_HDMI3_PB] = + { + .name = "Bxt HDMI Port3", + .stream_name = "Hdmi3", diff --git a/queue-4.8/asoc-sst-bxt-rt298-fix-obsoleted-initializers-for-array.patch b/queue-4.8/asoc-sst-bxt-rt298-fix-obsoleted-initializers-for-array.patch new file mode 100644 index 00000000000..9d9c7243c6d --- /dev/null +++ b/queue-4.8/asoc-sst-bxt-rt298-fix-obsoleted-initializers-for-array.patch @@ -0,0 +1,96 @@ +From 5919a3898136aae4d2cb4b18b44f70f7b185aa47 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Tue, 27 Sep 2016 07:45:08 +0900 +Subject: ASoC: sst-bxt-rt298: fix obsoleted initializers for array + +From: Takashi Sakamoto + +commit 5919a3898136aae4d2cb4b18b44f70f7b185aa47 upstream. + +Sparse reports below warnings. + +bxt_rt298.c:275:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:290:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:304:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:317:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:331:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:344:9: warning: obsolete array initializer, use C99 syntax +bxt_rt298.c:357:9: warning: obsolete array initializer, use C99 syntax + +There's no need to use obsoleted way. This commit fixes it. + +Fixes: 76016322ec56 (ASoC: Intel: Add Broxton-P machine driver) +Signed-off-by: Takashi Sakamoto +Acked-by: Vinod Koul +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/intel/boards/bxt_rt298.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/sound/soc/intel/boards/bxt_rt298.c ++++ b/sound/soc/intel/boards/bxt_rt298.c +@@ -271,7 +271,7 @@ static const struct snd_soc_ops broxton_ + /* broxton digital audio interface glue - connects codec <--> CPU */ + static struct snd_soc_dai_link broxton_rt298_dais[] = { + /* Front End DAI links */ +- [BXT_DPCM_AUDIO_PB] ++ [BXT_DPCM_AUDIO_PB] = + { + .name = "Bxt Audio Port", + .stream_name = "Audio", +@@ -286,7 +286,7 @@ static struct snd_soc_dai_link broxton_r + .dpcm_playback = 1, + .ops = &broxton_rt286_fe_ops, + }, +- [BXT_DPCM_AUDIO_CP] ++ [BXT_DPCM_AUDIO_CP] = + { + .name = "Bxt Audio Capture Port", + .stream_name = "Audio Record", +@@ -300,7 +300,7 @@ static struct snd_soc_dai_link broxton_r + .dpcm_capture = 1, + .ops = &broxton_rt286_fe_ops, + }, +- [BXT_DPCM_AUDIO_REF_CP] ++ [BXT_DPCM_AUDIO_REF_CP] = + { + .name = "Bxt Audio Reference cap", + .stream_name = "refcap", +@@ -313,7 +313,7 @@ static struct snd_soc_dai_link broxton_r + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_DMIC_CP] ++ [BXT_DPCM_AUDIO_DMIC_CP] = + { + .name = "Bxt Audio DMIC cap", + .stream_name = "dmiccap", +@@ -327,7 +327,7 @@ static struct snd_soc_dai_link broxton_r + .dynamic = 1, + .ops = &broxton_dmic_ops, + }, +- [BXT_DPCM_AUDIO_HDMI1_PB] ++ [BXT_DPCM_AUDIO_HDMI1_PB] = + { + .name = "Bxt HDMI Port1", + .stream_name = "Hdmi1", +@@ -340,7 +340,7 @@ static struct snd_soc_dai_link broxton_r + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_HDMI2_PB] ++ [BXT_DPCM_AUDIO_HDMI2_PB] = + { + .name = "Bxt HDMI Port2", + .stream_name = "Hdmi2", +@@ -353,7 +353,7 @@ static struct snd_soc_dai_link broxton_r + .nonatomic = 1, + .dynamic = 1, + }, +- [BXT_DPCM_AUDIO_HDMI3_PB] ++ [BXT_DPCM_AUDIO_HDMI3_PB] = + { + .name = "Bxt HDMI Port3", + .stream_name = "Hdmi3", diff --git a/queue-4.8/asoc-topology-fix-error-return-code-in-soc_tplg_dapm_widget_create.patch b/queue-4.8/asoc-topology-fix-error-return-code-in-soc_tplg_dapm_widget_create.patch new file mode 100644 index 00000000000..f029224c0a5 --- /dev/null +++ b/queue-4.8/asoc-topology-fix-error-return-code-in-soc_tplg_dapm_widget_create.patch @@ -0,0 +1,31 @@ +From 8ae3ea48df0d746b663057cf0b972a18d0777b7b Mon Sep 17 00:00:00 2001 +From: Wei Yongjun +Date: Wed, 10 Aug 2016 13:43:12 +0000 +Subject: ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() + +From: Wei Yongjun + +commit 8ae3ea48df0d746b663057cf0b972a18d0777b7b upstream. + +Fix to return error code -ENOMEM instead of 0 when failed to create +widget, as done elsewhere in this function. + +Fixes: 8a9782346dcc ("ASoC: topology: Add topology core") +Signed-off-by: Wei Yongjun +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-topology.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/soc-topology.c ++++ b/sound/soc/soc-topology.c +@@ -1475,6 +1475,7 @@ widget: + if (widget == NULL) { + dev_err(tplg->dev, "ASoC: failed to create widget %s controls\n", + w->name); ++ ret = -ENOMEM; + goto hdr_err; + } + diff --git a/queue-4.8/dmaengine-ipu-remove-bogus-no_irq-reference.patch b/queue-4.8/dmaengine-ipu-remove-bogus-no_irq-reference.patch new file mode 100644 index 00000000000..dda0b6d5a8d --- /dev/null +++ b/queue-4.8/dmaengine-ipu-remove-bogus-no_irq-reference.patch @@ -0,0 +1,56 @@ +From 86c7e6836479c4045a9a81ed5ea76c51d719f9c1 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Sat, 3 Sep 2016 01:22:02 +0200 +Subject: dmaengine: ipu: remove bogus NO_IRQ reference + +From: Arnd Bergmann + +commit 86c7e6836479c4045a9a81ed5ea76c51d719f9c1 upstream. + +A workaround for a warning introduced a use of the NO_IRQ +macro that should have been gone for a long time. + +It is clear from the code that the value cannot actually +be used, but apparently there was a configuration at +some point that caused a warning, so instead of just +reverting that patch, this rearranges the code in a way that +the warning cannot reappear. + +Signed-off-by: Arnd Bergmann +Fixes: 6ef41cf6f721 ("dmaengine :ipu: change ipu_irq_handler() to remove compile warning") +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/dma/ipu/ipu_irq.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/drivers/dma/ipu/ipu_irq.c ++++ b/drivers/dma/ipu/ipu_irq.c +@@ -286,22 +286,21 @@ static void ipu_irq_handler(struct irq_d + raw_spin_unlock(&bank_lock); + while ((line = ffs(status))) { + struct ipu_irq_map *map; +- unsigned int irq = NO_IRQ; ++ unsigned int irq; + + line--; + status &= ~(1UL << line); + + raw_spin_lock(&bank_lock); + map = src2map(32 * i + line); +- if (map) +- irq = map->irq; +- raw_spin_unlock(&bank_lock); +- + if (!map) { ++ raw_spin_unlock(&bank_lock); + pr_err("IPU: Interrupt on unmapped source %u bank %d\n", + line, i); + continue; + } ++ irq = map->irq; ++ raw_spin_unlock(&bank_lock); + generic_handle_irq(irq); + } + } diff --git a/queue-4.8/hwrng-omap-only-fail-if-pm_runtime_get_sync-returns-0.patch b/queue-4.8/hwrng-omap-only-fail-if-pm_runtime_get_sync-returns-0.patch new file mode 100644 index 00000000000..0b54b3d53e6 --- /dev/null +++ b/queue-4.8/hwrng-omap-only-fail-if-pm_runtime_get_sync-returns-0.patch @@ -0,0 +1,44 @@ +From ad8529fde9e3601180a839867a8ab041109aebb5 Mon Sep 17 00:00:00 2001 +From: Dave Gerlach +Date: Tue, 20 Sep 2016 10:25:40 -0500 +Subject: hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 + +From: Dave Gerlach + +commit ad8529fde9e3601180a839867a8ab041109aebb5 upstream. + +Currently omap-rng checks the return value of pm_runtime_get_sync and +reports failure if anything is returned, however it should be checking +if ret < 0 as pm_runtime_get_sync return 0 on success but also can return +1 if the device was already active which is not a failure case. Only +values < 0 are actual failures. + +Fixes: 61dc0a446e5d ("hwrng: omap - Fix assumption that runtime_get_sync will always succeed") +Signed-off-by: Dave Gerlach +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/hw_random/omap-rng.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/char/hw_random/omap-rng.c ++++ b/drivers/char/hw_random/omap-rng.c +@@ -385,7 +385,7 @@ static int omap_rng_probe(struct platfor + + pm_runtime_enable(&pdev->dev); + ret = pm_runtime_get_sync(&pdev->dev); +- if (ret) { ++ if (ret < 0) { + dev_err(&pdev->dev, "Failed to runtime_get device: %d\n", ret); + pm_runtime_put_noidle(&pdev->dev); + goto err_ioremap; +@@ -443,7 +443,7 @@ static int __maybe_unused omap_rng_resum + int ret; + + ret = pm_runtime_get_sync(dev); +- if (ret) { ++ if (ret < 0) { + dev_err(dev, "Failed to runtime_get device: %d\n", ret); + pm_runtime_put_noidle(dev); + return ret; diff --git a/queue-4.8/ib-hfi1-move-iowait_init-to-priv-allocate.patch b/queue-4.8/ib-hfi1-move-iowait_init-to-priv-allocate.patch new file mode 100644 index 00000000000..f2d43851fa0 --- /dev/null +++ b/queue-4.8/ib-hfi1-move-iowait_init-to-priv-allocate.patch @@ -0,0 +1,55 @@ +From 5a648dfad033bf5f945795c4e56ee7577f24f3e9 Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Tue, 6 Sep 2016 04:36:53 -0700 +Subject: IB/hfi1: Move iowait_init() to priv allocate + +From: Mike Marciniszyn + +commit 5a648dfad033bf5f945795c4e56ee7577f24f3e9 upstream. + +The call is misplaced in the reset calldown function +and causes issues with lockdep assertions that are to +be added. + +Fixes: Commit a2c2d608957c ("staging/rdma/hfi1: Remove create_qp functionality") +Reviewed-by: Ira Weiny +Reviewed-by: Dennis Dalessandro +Signed-off-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Doug Ledford +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/hw/hfi1/qp.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/infiniband/hw/hfi1/qp.c ++++ b/drivers/infiniband/hw/hfi1/qp.c +@@ -808,6 +808,13 @@ void *qp_priv_alloc(struct rvt_dev_info + kfree(priv); + return ERR_PTR(-ENOMEM); + } ++ iowait_init( ++ &priv->s_iowait, ++ 1, ++ _hfi1_do_send, ++ iowait_sleep, ++ iowait_wakeup, ++ iowait_sdma_drained); + setup_timer(&priv->s_rnr_timer, hfi1_rc_rnr_retry, (unsigned long)qp); + qp->s_timer.function = hfi1_rc_timeout; + return priv; +@@ -873,13 +880,6 @@ void notify_qp_reset(struct rvt_qp *qp) + { + struct hfi1_qp_priv *priv = qp->priv; + +- iowait_init( +- &priv->s_iowait, +- 1, +- _hfi1_do_send, +- iowait_sleep, +- iowait_wakeup, +- iowait_sdma_drained); + priv->r_adefered = 0; + clear_ahg(qp); + } diff --git a/queue-4.8/ib-mlx5-fix-steering-resource-leak.patch b/queue-4.8/ib-mlx5-fix-steering-resource-leak.patch new file mode 100644 index 00000000000..5ef7c7a4081 --- /dev/null +++ b/queue-4.8/ib-mlx5-fix-steering-resource-leak.patch @@ -0,0 +1,31 @@ +From 7055a29471eebf4b62687944694222635ed44b09 Mon Sep 17 00:00:00 2001 +From: Maor Gottlieb +Date: Sun, 28 Aug 2016 14:16:30 +0300 +Subject: IB/mlx5: Fix steering resource leak + +From: Maor Gottlieb + +commit 7055a29471eebf4b62687944694222635ed44b09 upstream. + +Fix multicast flow rule leak on adding unicast rule failure. + +Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') +Signed-off-by: Maor Gottlieb +Signed-off-by: Leon Romanovsky +Signed-off-by: Doug Ledford +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/hw/mlx5/main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/infiniband/hw/mlx5/main.c ++++ b/drivers/infiniband/hw/mlx5/main.c +@@ -1843,6 +1843,7 @@ static struct mlx5_ib_flow_handler *crea + &leftovers_specs[LEFTOVERS_UC].flow_attr, + dst); + if (IS_ERR(handler_ucast)) { ++ mlx5_del_flow_rule(handler->rule); + kfree(handler); + handler = handler_ucast; + } else { diff --git a/queue-4.8/ib-qib-remove-qpt_mask-global.patch b/queue-4.8/ib-qib-remove-qpt_mask-global.patch new file mode 100644 index 00000000000..9ecc8063c22 --- /dev/null +++ b/queue-4.8/ib-qib-remove-qpt_mask-global.patch @@ -0,0 +1,89 @@ +From 84b3adc2430eafd2eb703570075c3c141ea0ff13 Mon Sep 17 00:00:00 2001 +From: Dennis Dalessandro +Date: Sun, 25 Sep 2016 07:41:05 -0700 +Subject: IB/qib: Remove qpt_mask global + +From: Dennis Dalessandro + +commit 84b3adc2430eafd2eb703570075c3c141ea0ff13 upstream. + +There is no need to have a global qpt_mask as that does not support the +multiple chip model which qib has. Instead rely on the value which +exists already in the device data (dd). + +Fixes: 898fa52b4ac3 "IB/qib: Remove qpn, qp tables and related variables from qib" +Reviewed-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Doug Ledford +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/hw/qib/qib.h | 1 - + drivers/infiniband/hw/qib/qib_qp.c | 13 +++---------- + drivers/infiniband/hw/qib/qib_verbs.c | 2 -- + 3 files changed, 3 insertions(+), 13 deletions(-) + +--- a/drivers/infiniband/hw/qib/qib.h ++++ b/drivers/infiniband/hw/qib/qib.h +@@ -1131,7 +1131,6 @@ extern spinlock_t qib_devs_lock; + extern struct qib_devdata *qib_lookup(int unit); + extern u32 qib_cpulist_count; + extern unsigned long *qib_cpulist; +-extern u16 qpt_mask; + extern unsigned qib_cc_table_size; + + int qib_init(struct qib_devdata *, int); +--- a/drivers/infiniband/hw/qib/qib_qp.c ++++ b/drivers/infiniband/hw/qib/qib_qp.c +@@ -41,14 +41,6 @@ + + #include "qib.h" + +-/* +- * mask field which was present in now deleted qib_qpn_table +- * is not present in rvt_qpn_table. Defining the same field +- * as qpt_mask here instead of adding the mask field to +- * rvt_qpn_table. +- */ +-u16 qpt_mask; +- + static inline unsigned mk_qpn(struct rvt_qpn_table *qpt, + struct rvt_qpn_map *map, unsigned off) + { +@@ -57,7 +49,7 @@ static inline unsigned mk_qpn(struct rvt + + static inline unsigned find_next_offset(struct rvt_qpn_table *qpt, + struct rvt_qpn_map *map, unsigned off, +- unsigned n) ++ unsigned n, u16 qpt_mask) + { + if (qpt_mask) { + off++; +@@ -179,6 +171,7 @@ int qib_alloc_qpn(struct rvt_dev_info *r + struct qib_ibdev *verbs_dev = container_of(rdi, struct qib_ibdev, rdi); + struct qib_devdata *dd = container_of(verbs_dev, struct qib_devdata, + verbs_dev); ++ u16 qpt_mask = dd->qpn_mask; + + if (type == IB_QPT_SMI || type == IB_QPT_GSI) { + unsigned n; +@@ -215,7 +208,7 @@ int qib_alloc_qpn(struct rvt_dev_info *r + goto bail; + } + offset = find_next_offset(qpt, map, offset, +- dd->n_krcv_queues); ++ dd->n_krcv_queues, qpt_mask); + qpn = mk_qpn(qpt, map, offset); + /* + * This test differs from alloc_pidmap(). +--- a/drivers/infiniband/hw/qib/qib_verbs.c ++++ b/drivers/infiniband/hw/qib/qib_verbs.c +@@ -1606,8 +1606,6 @@ int qib_register_ib_device(struct qib_de + /* Only need to initialize non-zero fields. */ + setup_timer(&dev->mem_timer, mem_timer, (unsigned long)dev); + +- qpt_mask = dd->qpn_mask; +- + INIT_LIST_HEAD(&dev->piowait); + INIT_LIST_HEAD(&dev->dmawait); + INIT_LIST_HEAD(&dev->txwait); diff --git a/queue-4.8/ib-rdmavt-correct-sparse-annotation.patch b/queue-4.8/ib-rdmavt-correct-sparse-annotation.patch new file mode 100644 index 00000000000..cb694653779 --- /dev/null +++ b/queue-4.8/ib-rdmavt-correct-sparse-annotation.patch @@ -0,0 +1,44 @@ +From eefa1d8961584c5b76afded94960ca4344bc638b Mon Sep 17 00:00:00 2001 +From: Mike Marciniszyn +Date: Tue, 6 Sep 2016 04:36:33 -0700 +Subject: IB/rdmavt: Correct sparse annotation + +From: Mike Marciniszyn + +commit eefa1d8961584c5b76afded94960ca4344bc638b upstream. + +The __must_hold() is sufficent to correct the sparse +context imbalance inside a function. + +Per Documentation/sparse.txt: +__must_hold - The specified lock is held on function entry and exit. + +Fixes: Commit c0a67f6ba356 ("IB/rdmavt: Annotate rvt_reset_qp()") +Reviewed-by: Dennis Dalessandro +Signed-off-by: Mike Marciniszyn +Signed-off-by: Dennis Dalessandro +Signed-off-by: Doug Ledford +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/sw/rdmavt/qp.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +--- a/drivers/infiniband/sw/rdmavt/qp.c ++++ b/drivers/infiniband/sw/rdmavt/qp.c +@@ -501,12 +501,9 @@ static void rvt_remove_qp(struct rvt_dev + */ + static void rvt_reset_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, + enum ib_qp_type type) +- __releases(&qp->s_lock) +- __releases(&qp->s_hlock) +- __releases(&qp->r_lock) +- __acquires(&qp->r_lock) +- __acquires(&qp->s_hlock) +- __acquires(&qp->s_lock) ++ __must_hold(&qp->r_lock) ++ __must_hold(&qp->s_hlock) ++ __must_hold(&qp->s_lock) + { + if (qp->state != IB_QPS_RESET) { + qp->state = IB_QPS_RESET; diff --git a/queue-4.8/iio-ad5755-fix-off-by-one-on-devnr-limit-check.patch b/queue-4.8/iio-ad5755-fix-off-by-one-on-devnr-limit-check.patch new file mode 100644 index 00000000000..039a4f3af69 --- /dev/null +++ b/queue-4.8/iio-ad5755-fix-off-by-one-on-devnr-limit-check.patch @@ -0,0 +1,35 @@ +From 9d47964bfd471f0dd4c89f28556aec68bffa0020 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Mon, 25 Jul 2016 23:40:01 +0100 +Subject: iio: ad5755: fix off-by-one on devnr limit check + +From: Colin Ian King + +commit 9d47964bfd471f0dd4c89f28556aec68bffa0020 upstream. + +The comparison for devnr limits is off-by-one, the current check +allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact +0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds +write to pdata->dac[devnr]. Fix this by replacing > with >= on the +comparison. + +Signed-off-by: Colin Ian King +Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings") +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/dac/ad5755.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/dac/ad5755.c ++++ b/drivers/iio/dac/ad5755.c +@@ -655,7 +655,7 @@ static struct ad5755_platform_data *ad57 + + devnr = 0; + for_each_child_of_node(np, pp) { +- if (devnr > AD5755_NUM_CHANNELS) { ++ if (devnr >= AD5755_NUM_CHANNELS) { + dev_err(dev, + "There is to many channels defined in DT\n"); + goto error_out; diff --git a/queue-4.8/iio-light-us5182d-add-missing-error-code-assignment-before-test.patch b/queue-4.8/iio-light-us5182d-add-missing-error-code-assignment-before-test.patch new file mode 100644 index 00000000000..1187350f3c4 --- /dev/null +++ b/queue-4.8/iio-light-us5182d-add-missing-error-code-assignment-before-test.patch @@ -0,0 +1,33 @@ +From 281269f8a0b00f5c95de5158e8595ed51bdb4b0a Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Wed, 10 Aug 2016 07:18:16 +0200 +Subject: iio: light: us5182d: Add missing error code assignment before test + +From: Christophe JAILLET + +commit 281269f8a0b00f5c95de5158e8595ed51bdb4b0a upstream. + +It is likely that checking the result of 'pm_runtime_set_active' is +expected here. + +Fixes: f0e5f57d3ac2 ("iio: light: us8152d: Add power management support") + +Signed-off-by: Christophe JAILLET +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/light/us5182d.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/light/us5182d.c ++++ b/drivers/iio/light/us5182d.c +@@ -894,7 +894,7 @@ static int us5182d_probe(struct i2c_clie + goto out_err; + + if (data->default_continuous) { +- pm_runtime_set_active(&client->dev); ++ ret = pm_runtime_set_active(&client->dev); + if (ret < 0) + goto out_err; + } diff --git a/queue-4.8/mm-hugetlb-check-for-reserved-hugepages-during-memory-offline.patch b/queue-4.8/mm-hugetlb-check-for-reserved-hugepages-during-memory-offline.patch new file mode 100644 index 00000000000..b2dff957bdc --- /dev/null +++ b/queue-4.8/mm-hugetlb-check-for-reserved-hugepages-during-memory-offline.patch @@ -0,0 +1,140 @@ +From 082d5b6b60e9f25e1511557fcfcb21eedd267446 Mon Sep 17 00:00:00 2001 +From: Gerald Schaefer +Date: Fri, 7 Oct 2016 17:01:10 -0700 +Subject: mm/hugetlb: check for reserved hugepages during memory offline + +From: Gerald Schaefer + +commit 082d5b6b60e9f25e1511557fcfcb21eedd267446 upstream. + +In dissolve_free_huge_pages(), free hugepages will be dissolved without +making sure that there are enough of them left to satisfy hugepage +reservations. + +Fix this by adding a return value to dissolve_free_huge_pages() and +checking h->free_huge_pages vs. h->resv_huge_pages. Note that this may +lead to the situation where dissolve_free_huge_page() returns an error +and all free hugepages that were dissolved before that error are lost, +while the memory block still cannot be set offline. + +Fixes: c8721bbb ("mm: memory-hotplug: enable memory hotplug to handle hugepage") +Link: http://lkml.kernel.org/r/20160926172811.94033-3-gerald.schaefer@de.ibm.com +Signed-off-by: Gerald Schaefer +Acked-by: Michal Hocko +Acked-by: Naoya Horiguchi +Cc: "Kirill A . Shutemov" +Cc: Vlastimil Babka +Cc: Mike Kravetz +Cc: "Aneesh Kumar K . V" +Cc: Martin Schwidefsky +Cc: Heiko Carstens +Cc: Rui Teng +Cc: Dave Hansen +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/hugetlb.h | 6 +++--- + mm/hugetlb.c | 26 +++++++++++++++++++++----- + mm/memory_hotplug.c | 4 +++- + 3 files changed, 27 insertions(+), 9 deletions(-) + +--- a/include/linux/hugetlb.h ++++ b/include/linux/hugetlb.h +@@ -450,8 +450,8 @@ static inline pgoff_t basepage_index(str + return __basepage_index(page); + } + +-extern void dissolve_free_huge_pages(unsigned long start_pfn, +- unsigned long end_pfn); ++extern int dissolve_free_huge_pages(unsigned long start_pfn, ++ unsigned long end_pfn); + static inline bool hugepage_migration_supported(struct hstate *h) + { + #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION +@@ -518,7 +518,7 @@ static inline pgoff_t basepage_index(str + { + return page->index; + } +-#define dissolve_free_huge_pages(s, e) do {} while (0) ++#define dissolve_free_huge_pages(s, e) 0 + #define hugepage_migration_supported(h) false + + static inline spinlock_t *huge_pte_lockptr(struct hstate *h, +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -1437,22 +1437,32 @@ static int free_pool_huge_page(struct hs + + /* + * Dissolve a given free hugepage into free buddy pages. This function does +- * nothing for in-use (including surplus) hugepages. ++ * nothing for in-use (including surplus) hugepages. Returns -EBUSY if the ++ * number of free hugepages would be reduced below the number of reserved ++ * hugepages. + */ +-static void dissolve_free_huge_page(struct page *page) ++static int dissolve_free_huge_page(struct page *page) + { ++ int rc = 0; ++ + spin_lock(&hugetlb_lock); + if (PageHuge(page) && !page_count(page)) { + struct page *head = compound_head(page); + struct hstate *h = page_hstate(head); + int nid = page_to_nid(head); ++ if (h->free_huge_pages - h->resv_huge_pages == 0) { ++ rc = -EBUSY; ++ goto out; ++ } + list_del(&head->lru); + h->free_huge_pages--; + h->free_huge_pages_node[nid]--; + h->max_huge_pages--; + update_and_free_page(h, head); + } ++out: + spin_unlock(&hugetlb_lock); ++ return rc; + } + + /* +@@ -1460,16 +1470,22 @@ static void dissolve_free_huge_page(stru + * make specified memory blocks removable from the system. + * Note that this will dissolve a free gigantic hugepage completely, if any + * part of it lies within the given range. ++ * Also note that if dissolve_free_huge_page() returns with an error, all ++ * free hugepages that were dissolved before that error are lost. + */ +-void dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn) ++int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn) + { + unsigned long pfn; ++ int rc = 0; + + if (!hugepages_supported()) +- return; ++ return rc; + + for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << minimum_order) +- dissolve_free_huge_page(pfn_to_page(pfn)); ++ if (rc = dissolve_free_huge_page(pfn_to_page(pfn))) ++ break; ++ ++ return rc; + } + + /* +--- a/mm/memory_hotplug.c ++++ b/mm/memory_hotplug.c +@@ -1945,7 +1945,9 @@ repeat: + * dissolve free hugepages in the memory block before doing offlining + * actually in order to make hugetlbfs's object counting consistent. + */ +- dissolve_free_huge_pages(start_pfn, end_pfn); ++ ret = dissolve_free_huge_pages(start_pfn, end_pfn); ++ if (ret) ++ goto failed_removal; + /* check again */ + offlined_pages = check_pages_isolated(start_pfn, end_pfn); + if (offlined_pages < 0) { diff --git a/queue-4.8/power-bq24257-fix-use-of-uninitialized-pointer-bq-charger.patch b/queue-4.8/power-bq24257-fix-use-of-uninitialized-pointer-bq-charger.patch new file mode 100644 index 00000000000..c02dec4e075 --- /dev/null +++ b/queue-4.8/power-bq24257-fix-use-of-uninitialized-pointer-bq-charger.patch @@ -0,0 +1,55 @@ +From 0610735928ee47870e083d5901caa371089216f1 Mon Sep 17 00:00:00 2001 +From: Georges Savoundararadj +Date: Wed, 7 Sep 2016 18:38:15 -0700 +Subject: power: bq24257: Fix use of uninitialized pointer bq->charger + +From: Georges Savoundararadj + +commit 0610735928ee47870e083d5901caa371089216f1 upstream. + +bq->charger is initialized in bq24257_power_supply_init. +Therefore, bq24257_power_supply_init should be called before the +registration of the IRQ handler bq24257_irq_handler_thread that calls +power_supply_changed(bq->charger). + +Signed-off-by: Georges Savoundararadj +Cc: Aurelien Chanot +Cc: Andreas Dannenberg +Cc: Sebastian Reichel +Cc: David Woodhouse +Fixes: 2219a935963e ("power_supply: Add TI BQ24257 charger driver") +Signed-off-by: Sebastian Reichel +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/power/bq24257_charger.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/power/bq24257_charger.c ++++ b/drivers/power/bq24257_charger.c +@@ -1068,6 +1068,12 @@ static int bq24257_probe(struct i2c_clie + return ret; + } + ++ ret = bq24257_power_supply_init(bq); ++ if (ret < 0) { ++ dev_err(dev, "Failed to register power supply\n"); ++ return ret; ++ } ++ + ret = devm_request_threaded_irq(dev, client->irq, NULL, + bq24257_irq_handler_thread, + IRQF_TRIGGER_FALLING | +@@ -1078,12 +1084,6 @@ static int bq24257_probe(struct i2c_clie + return ret; + } + +- ret = bq24257_power_supply_init(bq); +- if (ret < 0) { +- dev_err(dev, "Failed to register power supply\n"); +- return ret; +- } +- + ret = sysfs_create_group(&bq->charger->dev.kobj, &bq24257_attr_group); + if (ret < 0) { + dev_err(dev, "Can't create sysfs entries\n"); diff --git a/queue-4.8/series b/queue-4.8/series index 5e260dbebeb..c5f1783abfe 100644 --- a/queue-4.8/series +++ b/queue-4.8/series @@ -57,3 +57,24 @@ crypto-gcm-fix-iv-buffer-size-in-crypto_gcm_setkey.patch crypto-marvell-update-transformation-context-for-each-dequeued-req.patch crypto-arm-ghash-ce-add-missing-async-import-export.patch crypto-ccp-fix-return-value-check-in-ccp_dmaengine_register.patch +hwrng-omap-only-fail-if-pm_runtime_get_sync-returns-0.patch +asoc-topology-fix-error-return-code-in-soc_tplg_dapm_widget_create.patch +asoc-dapm-fix-possible-uninitialized-variable-in-snd_soc_dapm_get_volsw.patch +asoc-dapm-fix-value-setting-for-_enum_double-mux-s-second-channel.patch +asoc-dapm-fix-kcontrol-creation-for-output-driver-widget.patch +asoc-sst-bxt-rt298-fix-obsoleted-initializers-for-array.patch +asoc-sst-bxt-da7219_max98357a-fix-obsoleted-initializers-for-array.patch +iio-ad5755-fix-off-by-one-on-devnr-limit-check.patch +iio-light-us5182d-add-missing-error-code-assignment-before-test.patch +staging-android-ion-hisi-fix-dependencies.patch +staging-sm750fb-correctly-set-clock_phase-bit-of-display-controller.patch +staging-r8188eu-fix-scheduling-while-atomic-splat.patch +staging-ks7010-fix-wait_for_completion_interruptible_timeout-return-handling.patch +staging-ks7010-declare-private-functions-static.patch +ib-hfi1-move-iowait_init-to-priv-allocate.patch +ib-rdmavt-correct-sparse-annotation.patch +ib-qib-remove-qpt_mask-global.patch +ib-mlx5-fix-steering-resource-leak.patch +power-bq24257-fix-use-of-uninitialized-pointer-bq-charger.patch +dmaengine-ipu-remove-bogus-no_irq-reference.patch +mm-hugetlb-check-for-reserved-hugepages-during-memory-offline.patch diff --git a/queue-4.8/staging-android-ion-hisi-fix-dependencies.patch b/queue-4.8/staging-android-ion-hisi-fix-dependencies.patch new file mode 100644 index 00000000000..2e5bc67f718 --- /dev/null +++ b/queue-4.8/staging-android-ion-hisi-fix-dependencies.patch @@ -0,0 +1,40 @@ +From 4a236d01b5e0d7e6f4ee9e6c4056fce10b38e8ad Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 15 Sep 2016 17:57:40 +0200 +Subject: staging: android ion/hisi: fix dependencies + +From: Arnd Bergmann + +commit 4a236d01b5e0d7e6f4ee9e6c4056fce10b38e8ad upstream. + +The newly added Hi6220 Ion code fails to build when the ION_OF helpers +are not present: + +drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_remove': +hi6220_ion.c:(.text.hi6220_ion_remove+0x4c): undefined reference to `ion_destroy_platform_data' +drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_probe': +hi6220_ion.c:(.text.hi6220_ion_probe+0x5c): undefined reference to `ion_parse_dt' +hi6220_ion.c:(.text.hi6220_ion_probe+0xf8): undefined reference to `ion_destroy_platform_data' + +This selects the symbol when needed. + +Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform") +Signed-off-by: Arnd Bergmann +Acked-by: Laura Abbott +Reviewed-by: Sumit Semwal +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/android/ion/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/staging/android/ion/Kconfig ++++ b/drivers/staging/android/ion/Kconfig +@@ -36,6 +36,7 @@ config ION_TEGRA + config ION_HISI + tristate "Ion for Hisilicon" + depends on ARCH_HISI && ION ++ select ION_OF + help + Choose this option if you wish to use ion on Hisilicon Platform. + diff --git a/queue-4.8/staging-ks7010-declare-private-functions-static.patch b/queue-4.8/staging-ks7010-declare-private-functions-static.patch new file mode 100644 index 00000000000..d7b8117a1d3 --- /dev/null +++ b/queue-4.8/staging-ks7010-declare-private-functions-static.patch @@ -0,0 +1,41 @@ +From 9afe11e956766eaac4643adaaf49f223dd536c92 Mon Sep 17 00:00:00 2001 +From: Nicholas Mc Guire +Date: Mon, 25 Jul 2016 21:22:27 +0200 +Subject: staging: ks7010: declare private functions static + +From: Nicholas Mc Guire + +commit 9afe11e956766eaac4643adaaf49f223dd536c92 upstream. + +Private functions in ks_hostif.c can be declared static. + +Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") + +Signed-off-by: Nicholas Mc Guire +Reviewed-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/ks7010/ks_hostif.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/ks7010/ks_hostif.c ++++ b/drivers/staging/ks7010/ks_hostif.c +@@ -69,7 +69,7 @@ inline u32 get_DWORD(struct ks_wlan_priv + return data; + } + +-void ks_wlan_hw_wakeup_task(struct work_struct *work) ++static void ks_wlan_hw_wakeup_task(struct work_struct *work) + { + struct ks_wlan_private *priv = + container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task); +@@ -1509,7 +1509,7 @@ void hostif_infrastructure_set_request(s + ks_wlan_hw_tx(priv, pp, hif_align_size(sizeof(*pp)), NULL, NULL, NULL); + } + +-void hostif_infrastructure_set2_request(struct ks_wlan_private *priv) ++static void hostif_infrastructure_set2_request(struct ks_wlan_private *priv) + { + struct hostif_infrastructure_set2_request_t *pp; + uint16_t capability; diff --git a/queue-4.8/staging-ks7010-fix-wait_for_completion_interruptible_timeout-return-handling.patch b/queue-4.8/staging-ks7010-fix-wait_for_completion_interruptible_timeout-return-handling.patch new file mode 100644 index 00000000000..9cdf0a7d8fe --- /dev/null +++ b/queue-4.8/staging-ks7010-fix-wait_for_completion_interruptible_timeout-return-handling.patch @@ -0,0 +1,44 @@ +From 9d29f14db1095f52ca00b8162b242d6fce07d19f Mon Sep 17 00:00:00 2001 +From: Nicholas Mc Guire +Date: Mon, 25 Jul 2016 21:21:50 +0200 +Subject: staging: ks7010: fix wait_for_completion_interruptible_timeout return handling + +From: Nicholas Mc Guire + +commit 9d29f14db1095f52ca00b8162b242d6fce07d19f upstream. + +wait_for_completion_interruptible_timeout return 0 on timeout and +-ERESTARTSYS if interrupted. The check for +!wait_for_completion_interruptible_timeout() would report an interrupt +as timeout. Further, while HZ/50 will work most of the time it could +fail for HZ < 50, so this is switched to msecs_to_jiffies(20). + +Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") + +Signed-off-by: Nicholas Mc Guire +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/ks7010/ks_hostif.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/staging/ks7010/ks_hostif.c ++++ b/drivers/staging/ks7010/ks_hostif.c +@@ -74,11 +74,15 @@ void ks_wlan_hw_wakeup_task(struct work_ + struct ks_wlan_private *priv = + container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task); + int ps_status = atomic_read(&priv->psstatus.status); ++ long time_left; + + if (ps_status == PS_SNOOZE) { + ks_wlan_hw_wakeup_request(priv); +- if (!wait_for_completion_interruptible_timeout(&priv->psstatus.wakeup_wait, HZ / 50)) { /* 20ms timeout */ +- DPRINTK(1, "wake up timeout !!!\n"); ++ time_left = wait_for_completion_interruptible_timeout( ++ &priv->psstatus.wakeup_wait, ++ msecs_to_jiffies(20)); ++ if (time_left <= 0) { ++ DPRINTK(1, "wake up timeout or interrupted !!!\n"); + schedule_work(&priv->ks_wlan_wakeup_task); + return; + } diff --git a/queue-4.8/staging-r8188eu-fix-scheduling-while-atomic-splat.patch b/queue-4.8/staging-r8188eu-fix-scheduling-while-atomic-splat.patch new file mode 100644 index 00000000000..ab357ae23e7 --- /dev/null +++ b/queue-4.8/staging-r8188eu-fix-scheduling-while-atomic-splat.patch @@ -0,0 +1,45 @@ +From 1335a9516d3d52f157ad87456efdd8dc9ae1747b Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Sun, 5 Jun 2016 14:11:19 -0500 +Subject: staging: r8188eu: Fix scheduling while atomic splat + +From: Larry Finger + +commit 1335a9516d3d52f157ad87456efdd8dc9ae1747b upstream. + +Commit fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: +Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation +calls to be GFP_KERNEL even though the original wrapper was testing +to determine if the caller was in atomic mode. Most of the mistakes +were corrected with commit 33dc85c3c667209c930b2dac5ccbc2a365e06b7a +("staging: r8188eu: Fix scheduling while atomic error introduced in +commit fadbe0cd"); however, two kzalloc calls were missed as the +call only happens when the driver is shutting down. + +Fixes: fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()") +Signed-off-by: Larry Finger +Cc: navin patidar +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8188eu/core/rtw_cmd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c ++++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c +@@ -670,13 +670,13 @@ u8 rtw_addbareq_cmd(struct adapter *pada + u8 res = _SUCCESS; + + +- ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); ++ ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); + if (!ph2c) { + res = _FAIL; + goto exit; + } + +- paddbareq_parm = kzalloc(sizeof(struct addBaReq_parm), GFP_KERNEL); ++ paddbareq_parm = kzalloc(sizeof(struct addBaReq_parm), GFP_ATOMIC); + if (!paddbareq_parm) { + kfree(ph2c); + res = _FAIL; diff --git a/queue-4.8/staging-sm750fb-correctly-set-clock_phase-bit-of-display-controller.patch b/queue-4.8/staging-sm750fb-correctly-set-clock_phase-bit-of-display-controller.patch new file mode 100644 index 00000000000..630a49f1d57 --- /dev/null +++ b/queue-4.8/staging-sm750fb-correctly-set-clock_phase-bit-of-display-controller.patch @@ -0,0 +1,33 @@ +From 992f961480d23e9ef9e686e512a419efef723523 Mon Sep 17 00:00:00 2001 +From: Phil Turnbull +Date: Fri, 2 Sep 2016 15:35:31 -0400 +Subject: staging: sm750fb: Correctly set CLOCK_PHASE bit of display controller. + +From: Phil Turnbull + +commit 992f961480d23e9ef9e686e512a419efef723523 upstream. + +Commit 6fba39cf32a3 ("staging: sm750fb: use BIT macro for +PANEL_DISPLAY_CTRL single-bit fields") accidentally changed the +CLOCK_PHASE logic from '|=' to '=' which clears all the previously set +bits. + +Fixes: 6fba39cf32a3 ("staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fields") +Signed-off-by: Phil Turnbull +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/sm750fb/ddk750_mode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/sm750fb/ddk750_mode.c ++++ b/drivers/staging/sm750fb/ddk750_mode.c +@@ -63,7 +63,7 @@ static unsigned long displayControlAdjus + dispControl |= (CRT_DISPLAY_CTRL_CRTSELECT | CRT_DISPLAY_CTRL_RGBBIT); + + /* Set bit 14 of display controller */ +- dispControl = DISPLAY_CTRL_CLOCK_PHASE; ++ dispControl |= DISPLAY_CTRL_CLOCK_PHASE; + + POKE32(CRT_DISPLAY_CTRL, dispControl); +