From e7affbb202ce841b91b855ed1abd586861ad025b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 4 Dec 2014 11:20:16 -0800 Subject: [PATCH] 3.17-stable patches added patches: asoc-cs42l51-re-hook-of_match_table-pointer.patch asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch asoc-fsi-remove-unsupported-pause-flag.patch asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch asoc-rsnd-remove-unsupported-pause-flag.patch asoc-rt5670-correct-the-incorrect-default-values.patch asoc-samsung-add-module_device_table-for-snow.patch asoc-sgtl5000-fix-small_pop-bit-definition.patch asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch ath9k-fix-rtc_derived_clk-usage.patch clockevent-sun4i-fix-race-condition-in-the-probe-code.patch ib-isert-adjust-cq-size-to-hw-limits.patch ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch iio-adc-men_z188_adc-add-terminating-entry-for.patch iio-fix-iio_event_code_extract_dir-bit-mask.patch of-base-fix-powerpc-address-parsing-hack.patch powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch powerpc-powernv-fix-the-hmi-event-version-check.patch powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch --- ...42l51-re-hook-of_match_table-pointer.patch | 68 +++++ ...ce-between-fe-be-updates-and-trigger.patch | 254 ++++++++++++++++++ ...oc-fsi-remove-unsupported-pause-flag.patch | 32 +++ ...infinite-loop-in-rockchip_snd_rxctrl.patch | 34 +++ ...c-rsnd-remove-unsupported-pause-flag.patch | 32 +++ ...correct-the-incorrect-default-values.patch | 114 ++++++++ ...ung-add-module_device_table-for-snow.patch | 32 +++ ...gtl5000-fix-small_pop-bit-definition.patch | 53 ++++ ...e-buffers-that-might-still-be-in-use.patch | 33 +++ .../ath9k-fix-rtc_derived_clk-usage.patch | 71 +++++ ...fix-race-condition-in-the-probe-code.patch | 57 ++++ ...ib-isert-adjust-cq-size-to-hw-limits.patch | 63 +++++ ...-2-minimum-for-control-pdu-responses.patch | 46 ++++ ...n_z188_adc-add-terminating-entry-for.patch | 30 +++ ...-iio_event_code_extract_dir-bit-mask.patch | 32 +++ ...ase-fix-powerpc-address-parsing-hack.patch | 67 +++++ ...so-function-uses-64-bit-instructions.patch | 34 +++ ...ernv-fix-the-hmi-event-version-check.patch | 42 +++ ...sert_reset-with-eeh_reset_deactivate.patch | 35 +++ ...diannes-issue-in-rtas-call-from-xmon.patch | 65 +++++ ...-honor-the-generic-no_64bit_msi-flag.patch | 29 ++ queue-3.17/series | 21 ++ 22 files changed, 1244 insertions(+) create mode 100644 queue-3.17/asoc-cs42l51-re-hook-of_match_table-pointer.patch create mode 100644 queue-3.17/asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch create mode 100644 queue-3.17/asoc-fsi-remove-unsupported-pause-flag.patch create mode 100644 queue-3.17/asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch create mode 100644 queue-3.17/asoc-rsnd-remove-unsupported-pause-flag.patch create mode 100644 queue-3.17/asoc-rt5670-correct-the-incorrect-default-values.patch create mode 100644 queue-3.17/asoc-samsung-add-module_device_table-for-snow.patch create mode 100644 queue-3.17/asoc-sgtl5000-fix-small_pop-bit-definition.patch create mode 100644 queue-3.17/asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch create mode 100644 queue-3.17/ath9k-fix-rtc_derived_clk-usage.patch create mode 100644 queue-3.17/clockevent-sun4i-fix-race-condition-in-the-probe-code.patch create mode 100644 queue-3.17/ib-isert-adjust-cq-size-to-hw-limits.patch create mode 100644 queue-3.17/ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch create mode 100644 queue-3.17/iio-adc-men_z188_adc-add-terminating-entry-for.patch create mode 100644 queue-3.17/iio-fix-iio_event_code_extract_dir-bit-mask.patch create mode 100644 queue-3.17/of-base-fix-powerpc-address-parsing-hack.patch create mode 100644 queue-3.17/powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch create mode 100644 queue-3.17/powerpc-powernv-fix-the-hmi-event-version-check.patch create mode 100644 queue-3.17/powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch create mode 100644 queue-3.17/powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch create mode 100644 queue-3.17/powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch diff --git a/queue-3.17/asoc-cs42l51-re-hook-of_match_table-pointer.patch b/queue-3.17/asoc-cs42l51-re-hook-of_match_table-pointer.patch new file mode 100644 index 00000000000..b56ba09206f --- /dev/null +++ b/queue-3.17/asoc-cs42l51-re-hook-of_match_table-pointer.patch @@ -0,0 +1,68 @@ +From 2cb1e0259f50c7be88eb277c7442fa74a3ce7c57 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 12 Nov 2014 15:40:44 +0100 +Subject: ASoC: cs42l51: re-hook of_match_table pointer + +From: Thomas Petazzoni + +commit 2cb1e0259f50c7be88eb277c7442fa74a3ce7c57 upstream. + +In commit a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver"), +the I2C part of the CS42L51 was moved to a separate file, but the +definition of the of_device_id array was left in the driver file +itself, no longer connected to the platform_driver structure using the +.of_match_table pointer. + +This commit exports the of_device_id array in cs42l51, and uses it as +.of_match_able in cs42l51-i2c.c. This solution was suggested by Brian +Austin. + +Fixes: a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver") +Signed-off-by: Thomas Petazzoni +Acked-by: Brian Austin +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/cs42l51-i2c.c | 1 + + sound/soc/codecs/cs42l51.c | 4 +++- + sound/soc/codecs/cs42l51.h | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +--- a/sound/soc/codecs/cs42l51-i2c.c ++++ b/sound/soc/codecs/cs42l51-i2c.c +@@ -46,6 +46,7 @@ static struct i2c_driver cs42l51_i2c_dri + .driver = { + .name = "cs42l51", + .owner = THIS_MODULE, ++ .of_match_table = cs42l51_of_match, + }, + .probe = cs42l51_i2c_probe, + .remove = cs42l51_i2c_remove, +--- a/sound/soc/codecs/cs42l51.c ++++ b/sound/soc/codecs/cs42l51.c +@@ -558,11 +558,13 @@ error: + } + EXPORT_SYMBOL_GPL(cs42l51_probe); + +-static const struct of_device_id cs42l51_of_match[] = { ++const struct of_device_id cs42l51_of_match[] = { + { .compatible = "cirrus,cs42l51", }, + { } + }; + MODULE_DEVICE_TABLE(of, cs42l51_of_match); ++EXPORT_SYMBOL_GPL(cs42l51_of_match); ++ + MODULE_AUTHOR("Arnaud Patard "); + MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver"); + MODULE_LICENSE("GPL"); +--- a/sound/soc/codecs/cs42l51.h ++++ b/sound/soc/codecs/cs42l51.h +@@ -22,6 +22,7 @@ struct device; + + extern const struct regmap_config cs42l51_regmap; + int cs42l51_probe(struct device *dev, struct regmap *regmap); ++extern const struct of_device_id cs42l51_of_match[]; + + #define CS42L51_CHIP_ID 0x1B + #define CS42L51_CHIP_REV_A 0x00 diff --git a/queue-3.17/asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch b/queue-3.17/asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch new file mode 100644 index 00000000000..4c08ae41729 --- /dev/null +++ b/queue-3.17/asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch @@ -0,0 +1,254 @@ +From ea9d0d771fcd32cd56070819749477d511ec9117 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 4 Nov 2014 16:52:28 +0100 +Subject: ASoC: dpcm: Fix race between FE/BE updates and trigger + +From: Takashi Iwai + +commit ea9d0d771fcd32cd56070819749477d511ec9117 upstream. + +DPCM can update the FE/BE connection states totally asynchronously +from the FE's PCM state. Most of FE/BE state changes are protected by +mutex, so that they won't race, but there are still some actions that +are uncovered. For example, suppose to switch a BE while a FE's +stream is running. This would call soc_dpcm_runtime_update(), which +sets FE's runtime_update flag, then sets up and starts BEs, and clears +FE's runtime_update flag again. + +When a device emits XRUN during this operation, the PCM core triggers +snd_pcm_stop(XRUN). Since the trigger action is an atomic ops, this +isn't blocked by the mutex, thus it kicks off DPCM's trigger action. +It eventually updates and clears FE's runtime_update flag while +soc_dpcm_runtime_update() is running concurrently, and it results in +confusion. + +Usually, for avoiding such a race, we take a lock. There is a PCM +stream lock for that purpose. However, as already mentioned, the +trigger action is atomic, and we can't take the lock for the whole +soc_dpcm_runtime_update() or other operations that include the lengthy +jobs like hw_params or prepare. + +This patch provides an alternative solution. This adds a way to defer +the conflicting trigger callback to be executed at the end of FE/BE +state changes. For doing it, two things are introduced: + +- Each runtime_update state change of FEs is protected via PCM stream + lock. +- The FE's trigger callback checks the runtime_update flag. If it's + not set, the trigger action is executed there. If set, mark the + pending trigger action and returns immediately. +- At the exit of runtime_update state change, it checks whether the + pending trigger is present. If yes, it executes the trigger action + at this point. + +Reported-and-tested-by: Qiao Zhou +Signed-off-by: Takashi Iwai +Acked-by: Liam Girdwood +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + include/sound/soc-dpcm.h | 2 + + sound/soc/soc-pcm.c | 72 ++++++++++++++++++++++++++++++++++++----------- + 2 files changed, 58 insertions(+), 16 deletions(-) + +--- a/include/sound/soc-dpcm.h ++++ b/include/sound/soc-dpcm.h +@@ -102,6 +102,8 @@ struct snd_soc_dpcm_runtime { + /* state and update */ + enum snd_soc_dpcm_update runtime_update; + enum snd_soc_dpcm_state state; ++ ++ int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ + }; + + /* can this BE stop and free */ +--- a/sound/soc/soc-pcm.c ++++ b/sound/soc/soc-pcm.c +@@ -1522,13 +1522,36 @@ static void dpcm_set_fe_runtime(struct s + dpcm_init_runtime_hw(runtime, &cpu_dai_drv->capture); + } + ++static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd); ++ ++/* Set FE's runtime_update state; the state is protected via PCM stream lock ++ * for avoiding the race with trigger callback. ++ * If the state is unset and a trigger is pending while the previous operation, ++ * process the pending trigger action here. ++ */ ++static void dpcm_set_fe_update_state(struct snd_soc_pcm_runtime *fe, ++ int stream, enum snd_soc_dpcm_update state) ++{ ++ struct snd_pcm_substream *substream = ++ snd_soc_dpcm_get_substream(fe, stream); ++ ++ snd_pcm_stream_lock_irq(substream); ++ if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { ++ dpcm_fe_dai_do_trigger(substream, ++ fe->dpcm[stream].trigger_pending - 1); ++ fe->dpcm[stream].trigger_pending = 0; ++ } ++ fe->dpcm[stream].runtime_update = state; ++ snd_pcm_stream_unlock_irq(substream); ++} ++ + static int dpcm_fe_dai_startup(struct snd_pcm_substream *fe_substream) + { + struct snd_soc_pcm_runtime *fe = fe_substream->private_data; + struct snd_pcm_runtime *runtime = fe_substream->runtime; + int stream = fe_substream->stream, ret = 0; + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); + + ret = dpcm_be_dai_startup(fe, fe_substream->stream); + if (ret < 0) { +@@ -1550,13 +1573,13 @@ static int dpcm_fe_dai_startup(struct sn + dpcm_set_fe_runtime(fe_substream); + snd_pcm_limit_hw_rates(runtime); + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + return 0; + + unwind: + dpcm_be_dai_startup_unwind(fe, fe_substream->stream); + be_err: +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + return ret; + } + +@@ -1603,7 +1626,7 @@ static int dpcm_fe_dai_shutdown(struct s + struct snd_soc_pcm_runtime *fe = substream->private_data; + int stream = substream->stream; + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); + + /* shutdown the BEs */ + dpcm_be_dai_shutdown(fe, substream->stream); +@@ -1617,7 +1640,7 @@ static int dpcm_fe_dai_shutdown(struct s + dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); + + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + return 0; + } + +@@ -1665,7 +1688,7 @@ static int dpcm_fe_dai_hw_free(struct sn + int err, stream = substream->stream; + + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); + + dev_dbg(fe->dev, "ASoC: hw_free FE %s\n", fe->dai_link->name); + +@@ -1680,7 +1703,7 @@ static int dpcm_fe_dai_hw_free(struct sn + err = dpcm_be_dai_hw_free(fe, stream); + + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + + mutex_unlock(&fe->card->mutex); + return 0; +@@ -1773,7 +1796,7 @@ static int dpcm_fe_dai_hw_params(struct + int ret, stream = substream->stream; + + mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); + + memcpy(&fe->dpcm[substream->stream].hw_params, params, + sizeof(struct snd_pcm_hw_params)); +@@ -1796,7 +1819,7 @@ static int dpcm_fe_dai_hw_params(struct + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; + + out: +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + mutex_unlock(&fe->card->mutex); + return ret; + } +@@ -1910,7 +1933,7 @@ int dpcm_be_dai_trigger(struct snd_soc_p + } + EXPORT_SYMBOL_GPL(dpcm_be_dai_trigger); + +-static int dpcm_fe_dai_trigger(struct snd_pcm_substream *substream, int cmd) ++static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd) + { + struct snd_soc_pcm_runtime *fe = substream->private_data; + int stream = substream->stream, ret; +@@ -1984,6 +2007,23 @@ out: + return ret; + } + ++static int dpcm_fe_dai_trigger(struct snd_pcm_substream *substream, int cmd) ++{ ++ struct snd_soc_pcm_runtime *fe = substream->private_data; ++ int stream = substream->stream; ++ ++ /* if FE's runtime_update is already set, we're in race; ++ * process this trigger later at exit ++ */ ++ if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) { ++ fe->dpcm[stream].trigger_pending = cmd + 1; ++ return 0; /* delayed, assuming it's successful */ ++ } ++ ++ /* we're alone, let's trigger */ ++ return dpcm_fe_dai_do_trigger(substream, cmd); ++} ++ + int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) + { + struct snd_soc_dpcm *dpcm; +@@ -2027,7 +2067,7 @@ static int dpcm_fe_dai_prepare(struct sn + + dev_dbg(fe->dev, "ASoC: prepare FE %s\n", fe->dai_link->name); + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); + + /* there is no point preparing this FE if there are no BEs */ + if (list_empty(&fe->dpcm[stream].be_clients)) { +@@ -2054,7 +2094,7 @@ static int dpcm_fe_dai_prepare(struct sn + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; + + out: +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + mutex_unlock(&fe->card->mutex); + + return ret; +@@ -2201,11 +2241,11 @@ static int dpcm_run_new_update(struct sn + { + int ret; + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); + ret = dpcm_run_update_startup(fe, stream); + if (ret < 0) + dev_err(fe->dev, "ASoC: failed to startup some BEs\n"); +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + + return ret; + } +@@ -2214,11 +2254,11 @@ static int dpcm_run_old_update(struct sn + { + int ret; + +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); + ret = dpcm_run_update_shutdown(fe, stream); + if (ret < 0) + dev_err(fe->dev, "ASoC: failed to shutdown some BEs\n"); +- fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; ++ dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); + + return ret; + } diff --git a/queue-3.17/asoc-fsi-remove-unsupported-pause-flag.patch b/queue-3.17/asoc-fsi-remove-unsupported-pause-flag.patch new file mode 100644 index 00000000000..18557cf1161 --- /dev/null +++ b/queue-3.17/asoc-fsi-remove-unsupported-pause-flag.patch @@ -0,0 +1,32 @@ +From c1b9b9b1ad2df6144ca3fbe6989f7bd9ea5c5562 Mon Sep 17 00:00:00 2001 +From: Kuninori Morimoto +Date: Tue, 28 Oct 2014 21:01:53 -0700 +Subject: ASoC: fsi: remove unsupported PAUSE flag + +From: Kuninori Morimoto + +commit c1b9b9b1ad2df6144ca3fbe6989f7bd9ea5c5562 upstream. + +FSI doesn't support PAUSE. +Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info + +Signed-off-by: Kuninori Morimoto +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/sh/fsi.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/sound/soc/sh/fsi.c ++++ b/sound/soc/sh/fsi.c +@@ -1706,8 +1706,7 @@ static const struct snd_soc_dai_ops fsi_ + static struct snd_pcm_hardware fsi_pcm_hardware = { + .info = SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_MMAP | +- SNDRV_PCM_INFO_MMAP_VALID | +- SNDRV_PCM_INFO_PAUSE, ++ SNDRV_PCM_INFO_MMAP_VALID, + .buffer_bytes_max = 64 * 1024, + .period_bytes_min = 32, + .period_bytes_max = 8192, diff --git a/queue-3.17/asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch b/queue-3.17/asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch new file mode 100644 index 00000000000..6f5d2b93c3d --- /dev/null +++ b/queue-3.17/asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch @@ -0,0 +1,34 @@ +From 29f95bd76f6ec1eff88eec6a04191104a11a7f97 Mon Sep 17 00:00:00 2001 +From: Jianqun +Date: Wed, 29 Oct 2014 17:45:51 +0800 +Subject: ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl + +From: Jianqun + +commit 29f95bd76f6ec1eff88eec6a04191104a11a7f97 upstream. + +We can get into an infinite loop if the I2S_CLR register fails to +clear due to a missing break statement, so add that. + +Signed-off-by: Jianqun +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/rockchip/rockchip_i2s.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/soc/rockchip/rockchip_i2s.c ++++ b/sound/soc/rockchip/rockchip_i2s.c +@@ -152,8 +152,10 @@ static void rockchip_snd_rxctrl(struct r + while (val) { + regmap_read(i2s->regmap, I2S_CLR, &val); + retry--; +- if (!retry) ++ if (!retry) { + dev_warn(i2s->dev, "fail to clear\n"); ++ break; ++ } + } + } + } diff --git a/queue-3.17/asoc-rsnd-remove-unsupported-pause-flag.patch b/queue-3.17/asoc-rsnd-remove-unsupported-pause-flag.patch new file mode 100644 index 00000000000..4df3ee7b644 --- /dev/null +++ b/queue-3.17/asoc-rsnd-remove-unsupported-pause-flag.patch @@ -0,0 +1,32 @@ +From 706c66213e5e623e23f521b1acbd8171af7a3549 Mon Sep 17 00:00:00 2001 +From: Kuninori Morimoto +Date: Tue, 28 Oct 2014 21:02:03 -0700 +Subject: ASoC: rsnd: remove unsupported PAUSE flag + +From: Kuninori Morimoto + +commit 706c66213e5e623e23f521b1acbd8171af7a3549 upstream. + +R-Car sound doesn't support PAUSE. +Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info + +Signed-off-by: Kuninori Morimoto +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/sh/rcar/core.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/sound/soc/sh/rcar/core.c ++++ b/sound/soc/sh/rcar/core.c +@@ -888,8 +888,7 @@ static int rsnd_dai_probe(struct platfor + static struct snd_pcm_hardware rsnd_pcm_hardware = { + .info = SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_MMAP | +- SNDRV_PCM_INFO_MMAP_VALID | +- SNDRV_PCM_INFO_PAUSE, ++ SNDRV_PCM_INFO_MMAP_VALID, + .buffer_bytes_max = 64 * 1024, + .period_bytes_min = 32, + .period_bytes_max = 8192, diff --git a/queue-3.17/asoc-rt5670-correct-the-incorrect-default-values.patch b/queue-3.17/asoc-rt5670-correct-the-incorrect-default-values.patch new file mode 100644 index 00000000000..79e8262ca57 --- /dev/null +++ b/queue-3.17/asoc-rt5670-correct-the-incorrect-default-values.patch @@ -0,0 +1,114 @@ +From ac87f22147098da9cf83a0b413ef7dda42277d85 Mon Sep 17 00:00:00 2001 +From: Bard Liao +Date: Thu, 6 Nov 2014 12:23:52 +0800 +Subject: ASoC: rt5670: correct the incorrect default values + +From: Bard Liao + +commit ac87f22147098da9cf83a0b413ef7dda42277d85 upstream. + +The patch corrects the incorrect default register values. + +Signed-off-by: Bard Liao +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/rt5670.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +--- a/sound/soc/codecs/rt5670.c ++++ b/sound/soc/codecs/rt5670.c +@@ -100,18 +100,18 @@ static const struct reg_default rt5670_r + { 0x4c, 0x5380 }, + { 0x4f, 0x0073 }, + { 0x52, 0x00d3 }, +- { 0x53, 0xf0f0 }, ++ { 0x53, 0xf000 }, + { 0x61, 0x0000 }, + { 0x62, 0x0001 }, + { 0x63, 0x00c3 }, + { 0x64, 0x0000 }, +- { 0x65, 0x0000 }, ++ { 0x65, 0x0001 }, + { 0x66, 0x0000 }, + { 0x6f, 0x8000 }, + { 0x70, 0x8000 }, + { 0x71, 0x8000 }, + { 0x72, 0x8000 }, +- { 0x73, 0x1110 }, ++ { 0x73, 0x7770 }, + { 0x74, 0x0e00 }, + { 0x75, 0x1505 }, + { 0x76, 0x0015 }, +@@ -125,21 +125,21 @@ static const struct reg_default rt5670_r + { 0x83, 0x0000 }, + { 0x84, 0x0000 }, + { 0x85, 0x0000 }, +- { 0x86, 0x0008 }, ++ { 0x86, 0x0004 }, + { 0x87, 0x0000 }, + { 0x88, 0x0000 }, + { 0x89, 0x0000 }, + { 0x8a, 0x0000 }, + { 0x8b, 0x0000 }, +- { 0x8c, 0x0007 }, ++ { 0x8c, 0x0003 }, + { 0x8d, 0x0000 }, + { 0x8e, 0x0004 }, + { 0x8f, 0x1100 }, + { 0x90, 0x0646 }, + { 0x91, 0x0c06 }, + { 0x93, 0x0000 }, +- { 0x94, 0x0000 }, +- { 0x95, 0x0000 }, ++ { 0x94, 0x1270 }, ++ { 0x95, 0x1000 }, + { 0x97, 0x0000 }, + { 0x98, 0x0000 }, + { 0x99, 0x0000 }, +@@ -150,11 +150,11 @@ static const struct reg_default rt5670_r + { 0x9e, 0x0400 }, + { 0xae, 0x7000 }, + { 0xaf, 0x0000 }, +- { 0xb0, 0x6000 }, ++ { 0xb0, 0x7000 }, + { 0xb1, 0x0000 }, + { 0xb2, 0x0000 }, + { 0xb3, 0x001f }, +- { 0xb4, 0x2206 }, ++ { 0xb4, 0x220c }, + { 0xb5, 0x1f00 }, + { 0xb6, 0x0000 }, + { 0xb7, 0x0000 }, +@@ -171,25 +171,25 @@ static const struct reg_default rt5670_r + { 0xcf, 0x1813 }, + { 0xd0, 0x0690 }, + { 0xd1, 0x1c17 }, +- { 0xd3, 0xb320 }, ++ { 0xd3, 0xa220 }, + { 0xd4, 0x0000 }, + { 0xd6, 0x0400 }, + { 0xd9, 0x0809 }, + { 0xda, 0x0000 }, + { 0xdb, 0x0001 }, + { 0xdc, 0x0049 }, +- { 0xdd, 0x0009 }, ++ { 0xdd, 0x0024 }, + { 0xe6, 0x8000 }, + { 0xe7, 0x0000 }, +- { 0xec, 0xb300 }, ++ { 0xec, 0xa200 }, + { 0xed, 0x0000 }, +- { 0xee, 0xb300 }, ++ { 0xee, 0xa200 }, + { 0xef, 0x0000 }, + { 0xf8, 0x0000 }, + { 0xf9, 0x0000 }, + { 0xfa, 0x8010 }, + { 0xfb, 0x0033 }, +- { 0xfc, 0x0080 }, ++ { 0xfc, 0x0100 }, + }; + + static bool rt5670_volatile_register(struct device *dev, unsigned int reg) diff --git a/queue-3.17/asoc-samsung-add-module_device_table-for-snow.patch b/queue-3.17/asoc-samsung-add-module_device_table-for-snow.patch new file mode 100644 index 00000000000..d8b162970d9 --- /dev/null +++ b/queue-3.17/asoc-samsung-add-module_device_table-for-snow.patch @@ -0,0 +1,32 @@ +From 62e6a3b6f4e1f9b96fa66ab1cdf2ffd8594df9e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20F=C3=A4rber?= +Date: Wed, 5 Nov 2014 17:44:52 +0100 +Subject: ASoC: samsung: Add MODULE_DEVICE_TABLE for Snow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Andreas=20F=C3=A4rber?= + +commit 62e6a3b6f4e1f9b96fa66ab1cdf2ffd8594df9e9 upstream. + +This enables the snd_soc_snow module to be auto-loaded. + +Signed-off-by: Andreas Färber +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/samsung/snow.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/samsung/snow.c ++++ b/sound/soc/samsung/snow.c +@@ -110,6 +110,7 @@ static const struct of_device_id snow_of + { .compatible = "google,snow-audio-max98095", }, + {}, + }; ++MODULE_DEVICE_TABLE(of, snow_of_match); + + static struct platform_driver snow_driver = { + .driver = { diff --git a/queue-3.17/asoc-sgtl5000-fix-small_pop-bit-definition.patch b/queue-3.17/asoc-sgtl5000-fix-small_pop-bit-definition.patch new file mode 100644 index 00000000000..5eaf0a61383 --- /dev/null +++ b/queue-3.17/asoc-sgtl5000-fix-small_pop-bit-definition.patch @@ -0,0 +1,53 @@ +From c251ea7bd7a04f1f2575467e0de76e803cf59149 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Fri, 14 Nov 2014 02:14:47 -0200 +Subject: ASoC: sgtl5000: Fix SMALL_POP bit definition + +From: Fabio Estevam + +commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream. + +On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen +5 seconds after the end of a playback. + +The SMALL_POP bit should fix this, but its definition is incorrect: +according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not +bit 1. + +Fix the definition accordingly and enable the bit as intended per the code +comment. + +After applying this change, no loud 'click' sound is heard after playback + +Signed-off-by: Fabio Estevam +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/sgtl5000.c | 3 +-- + sound/soc/codecs/sgtl5000.h | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +--- a/sound/soc/codecs/sgtl5000.c ++++ b/sound/soc/codecs/sgtl5000.c +@@ -1316,8 +1316,7 @@ static int sgtl5000_probe(struct snd_soc + + /* enable small pop, introduce 400ms delay in turning off */ + snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, +- SGTL5000_SMALL_POP, +- SGTL5000_SMALL_POP); ++ SGTL5000_SMALL_POP, 1); + + /* disable short cut detector */ + snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0); +--- a/sound/soc/codecs/sgtl5000.h ++++ b/sound/soc/codecs/sgtl5000.h +@@ -275,7 +275,7 @@ + #define SGTL5000_BIAS_CTRL_MASK 0x000e + #define SGTL5000_BIAS_CTRL_SHIFT 1 + #define SGTL5000_BIAS_CTRL_WIDTH 3 +-#define SGTL5000_SMALL_POP 0x0001 ++#define SGTL5000_SMALL_POP 0 + + /* + * SGTL5000_CHIP_MIC_CTRL diff --git a/queue-3.17/asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch b/queue-3.17/asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch new file mode 100644 index 00000000000..7df37d93ced --- /dev/null +++ b/queue-3.17/asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch @@ -0,0 +1,33 @@ +From 9da7a5a9fdeeb76b2243f6b473363a7e6147ab6f Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Mon, 17 Nov 2014 10:48:21 +0000 +Subject: ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use + +From: Charles Keepax + +commit 9da7a5a9fdeeb76b2243f6b473363a7e6147ab6f upstream. + +We should not free any buffers associated with writing out coefficients +to the DSP until all the async writes have completed. This patch updates +the out of memory path when allocating a new buffer to include a call to +regmap_async_complete. + +Reported-by: JS Park +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm_adsp.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/codecs/wm_adsp.c ++++ b/sound/soc/codecs/wm_adsp.c +@@ -1355,6 +1355,7 @@ static int wm_adsp_load_coeff(struct wm_ + file, blocks, pos - firmware->size); + + out_fw: ++ regmap_async_complete(regmap); + release_firmware(firmware); + wm_adsp_buf_free(&buf_list); + out: diff --git a/queue-3.17/ath9k-fix-rtc_derived_clk-usage.patch b/queue-3.17/ath9k-fix-rtc_derived_clk-usage.patch new file mode 100644 index 00000000000..fc3e3961d67 --- /dev/null +++ b/queue-3.17/ath9k-fix-rtc_derived_clk-usage.patch @@ -0,0 +1,71 @@ +From 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 Mon Sep 17 00:00:00 2001 +From: Miaoqing Pan +Date: Thu, 6 Nov 2014 10:52:23 +0530 +Subject: ath9k: Fix RTC_DERIVED_CLK usage + +From: Miaoqing Pan + +commit 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 upstream. + +Based on the reference clock, which could be 25MHz or 40MHz, +AR_RTC_DERIVED_CLK is programmed differently for AR9340 and AR9550. +But, when a chip reset is done, processing the initvals +sets the register back to the default value. + +Fix this by moving the code in ath9k_hw_init_pll() to +ar9003_hw_override_ini(). Also, do this override for AR9531. + +Signed-off-by: Miaoqing Pan +Signed-off-by: Sujith Manoharan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/ar9003_phy.c | 13 +++++++++++++ + drivers/net/wireless/ath/ath9k/hw.c | 13 ------------- + 2 files changed, 13 insertions(+), 13 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c +@@ -647,6 +647,19 @@ static void ar9003_hw_override_ini(struc + ah->enabled_cals |= TX_CL_CAL; + else + ah->enabled_cals &= ~TX_CL_CAL; ++ ++ if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah)) { ++ if (ah->is_clk_25mhz) { ++ REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x17c << 1); ++ REG_WRITE(ah, AR_SLP32_MODE, 0x0010f3d7); ++ REG_WRITE(ah, AR_SLP32_INC, 0x0001e7ae); ++ } else { ++ REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x261 << 1); ++ REG_WRITE(ah, AR_SLP32_MODE, 0x0010f400); ++ REG_WRITE(ah, AR_SLP32_INC, 0x0001e800); ++ } ++ udelay(100); ++ } + } + + static void ar9003_hw_prog_ini(struct ath_hw *ah, +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -859,19 +859,6 @@ static void ath9k_hw_init_pll(struct ath + udelay(RTC_PLL_SETTLE_DELAY); + + REG_WRITE(ah, AR_RTC_SLEEP_CLK, AR_RTC_FORCE_DERIVED_CLK); +- +- if (AR_SREV_9340(ah) || AR_SREV_9550(ah)) { +- if (ah->is_clk_25mhz) { +- REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x17c << 1); +- REG_WRITE(ah, AR_SLP32_MODE, 0x0010f3d7); +- REG_WRITE(ah, AR_SLP32_INC, 0x0001e7ae); +- } else { +- REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x261 << 1); +- REG_WRITE(ah, AR_SLP32_MODE, 0x0010f400); +- REG_WRITE(ah, AR_SLP32_INC, 0x0001e800); +- } +- udelay(100); +- } + } + + static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah, diff --git a/queue-3.17/clockevent-sun4i-fix-race-condition-in-the-probe-code.patch b/queue-3.17/clockevent-sun4i-fix-race-condition-in-the-probe-code.patch new file mode 100644 index 00000000000..d9b5de79ce4 --- /dev/null +++ b/queue-3.17/clockevent-sun4i-fix-race-condition-in-the-probe-code.patch @@ -0,0 +1,57 @@ +From 6bab4a8a1888729f17f4923cc5867e4674f66333 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 18 Nov 2014 23:59:33 +0100 +Subject: clockevent: sun4i: Fix race condition in the probe code + +From: Maxime Ripard + +commit 6bab4a8a1888729f17f4923cc5867e4674f66333 upstream. + +The interrupts were activated and the handler registered before the clockevent +was registered in the probe function. + +The interrupt handler, however, was making the assumption that the clockevent +device was registered. + +That could cause a null pointer dereference if the timer interrupt was firing +during this narrow window. + +Fix that by moving the clockevent registration before the interrupt is enabled. + +Reported-by: Roman Byshko +Signed-off-by: Maxime Ripard +Signed-off-by: Daniel Lezcano +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clocksource/sun4i_timer.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/clocksource/sun4i_timer.c ++++ b/drivers/clocksource/sun4i_timer.c +@@ -182,6 +182,12 @@ static void __init sun4i_timer_init(stru + /* Make sure timer is stopped before playing with interrupts */ + sun4i_clkevt_time_stop(0); + ++ sun4i_clockevent.cpumask = cpu_possible_mask; ++ sun4i_clockevent.irq = irq; ++ ++ clockevents_config_and_register(&sun4i_clockevent, rate, ++ TIMER_SYNC_TICKS, 0xffffffff); ++ + ret = setup_irq(irq, &sun4i_timer_irq); + if (ret) + pr_warn("failed to setup irq %d\n", irq); +@@ -189,12 +195,6 @@ static void __init sun4i_timer_init(stru + /* Enable timer0 interrupt */ + val = readl(timer_base + TIMER_IRQ_EN_REG); + writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); +- +- sun4i_clockevent.cpumask = cpu_possible_mask; +- sun4i_clockevent.irq = irq; +- +- clockevents_config_and_register(&sun4i_clockevent, rate, +- TIMER_SYNC_TICKS, 0xffffffff); + } + CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer", + sun4i_timer_init); diff --git a/queue-3.17/ib-isert-adjust-cq-size-to-hw-limits.patch b/queue-3.17/ib-isert-adjust-cq-size-to-hw-limits.patch new file mode 100644 index 00000000000..50126f32ba9 --- /dev/null +++ b/queue-3.17/ib-isert-adjust-cq-size-to-hw-limits.patch @@ -0,0 +1,63 @@ +From b1a5ad006b34ded9dc7ec64988deba1b3ecad367 Mon Sep 17 00:00:00 2001 +From: Chris Moore +Date: Tue, 4 Nov 2014 16:28:29 +0000 +Subject: IB/isert: Adjust CQ size to HW limits + +From: Chris Moore + +commit b1a5ad006b34ded9dc7ec64988deba1b3ecad367 upstream. + +isert has an issue of trying to create a CQ with more CQEs than are +supported by the hardware, that currently results in failures during +isert_device creation during first session login. + +This is the isert version of the patch that Minh Tran submitted for +iser, and is simple a workaround required to function with existing +ocrdma hardware. + +Signed-off-by: Chris Moore +Reviewied-by: Sagi Grimberg +Signed-off-by: Nicholas Bellinger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/ulp/isert/ib_isert.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/infiniband/ulp/isert/ib_isert.c ++++ b/drivers/infiniband/ulp/isert/ib_isert.c +@@ -225,12 +225,16 @@ isert_create_device_ib_res(struct isert_ + struct isert_cq_desc *cq_desc; + struct ib_device_attr *dev_attr; + int ret = 0, i, j; ++ int max_rx_cqe, max_tx_cqe; + + dev_attr = &device->dev_attr; + ret = isert_query_device(ib_dev, dev_attr); + if (ret) + return ret; + ++ max_rx_cqe = min(ISER_MAX_RX_CQ_LEN, dev_attr->max_cqe); ++ max_tx_cqe = min(ISER_MAX_TX_CQ_LEN, dev_attr->max_cqe); ++ + /* asign function handlers */ + if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS && + dev_attr->device_cap_flags & IB_DEVICE_SIGNATURE_HANDOVER) { +@@ -272,7 +276,7 @@ isert_create_device_ib_res(struct isert_ + isert_cq_rx_callback, + isert_cq_event_callback, + (void *)&cq_desc[i], +- ISER_MAX_RX_CQ_LEN, i); ++ max_rx_cqe, i); + if (IS_ERR(device->dev_rx_cq[i])) { + ret = PTR_ERR(device->dev_rx_cq[i]); + device->dev_rx_cq[i] = NULL; +@@ -284,7 +288,7 @@ isert_create_device_ib_res(struct isert_ + isert_cq_tx_callback, + isert_cq_event_callback, + (void *)&cq_desc[i], +- ISER_MAX_TX_CQ_LEN, i); ++ max_tx_cqe, i); + if (IS_ERR(device->dev_tx_cq[i])) { + ret = PTR_ERR(device->dev_tx_cq[i]); + device->dev_tx_cq[i] = NULL; diff --git a/queue-3.17/ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch b/queue-3.17/ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch new file mode 100644 index 00000000000..58838d76b8a --- /dev/null +++ b/queue-3.17/ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch @@ -0,0 +1,46 @@ +From f57915cfa5b2b14c1cffa2e83c034f55e3f0e70d Mon Sep 17 00:00:00 2001 +From: Or Gerlitz +Date: Wed, 22 Oct 2014 14:55:49 -0700 +Subject: ib_isert: Add max_send_sge=2 minimum for control PDU responses + +From: Or Gerlitz + +commit f57915cfa5b2b14c1cffa2e83c034f55e3f0e70d upstream. + +This patch adds a max_send_sge=2 minimum in isert_conn_setup_qp() +to ensure outgoing control PDU responses with tx_desc->num_sge=2 +are able to function correctly. + +This addresses a bug with RDMA hardware using dev_attr.max_sge=3, +that in the original code with the ConnectX-2 work-around would +result in isert_conn->max_sge=1 being negotiated. + +Originally reported by Chris with ocrdma driver. + +Reported-by: Chris Moore +Tested-by: Chris Moore +Signed-off-by: Or Gerlitz +Signed-off-by: Nicholas Bellinger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/ulp/isert/ib_isert.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/infiniband/ulp/isert/ib_isert.c ++++ b/drivers/infiniband/ulp/isert/ib_isert.c +@@ -115,9 +115,12 @@ isert_conn_setup_qp(struct isert_conn *i + attr.cap.max_recv_wr = ISERT_QP_MAX_RECV_DTOS; + /* + * FIXME: Use devattr.max_sge - 2 for max_send_sge as +- * work-around for RDMA_READ.. ++ * work-around for RDMA_READs with ConnectX-2. ++ * ++ * Also, still make sure to have at least two SGEs for ++ * outgoing control PDU responses. + */ +- attr.cap.max_send_sge = device->dev_attr.max_sge - 2; ++ attr.cap.max_send_sge = max(2, device->dev_attr.max_sge - 2); + isert_conn->max_sge = attr.cap.max_send_sge; + + attr.cap.max_recv_sge = 1; diff --git a/queue-3.17/iio-adc-men_z188_adc-add-terminating-entry-for.patch b/queue-3.17/iio-adc-men_z188_adc-add-terminating-entry-for.patch new file mode 100644 index 00000000000..8e64ec9b64f --- /dev/null +++ b/queue-3.17/iio-adc-men_z188_adc-add-terminating-entry-for.patch @@ -0,0 +1,30 @@ +From fbbba1f89eb68e7d07707e104193d56de8e37fe5 Mon Sep 17 00:00:00 2001 +From: Axel Lin +Date: Mon, 10 Nov 2014 16:04:06 +0800 +Subject: iio: adc: men_z188_adc: Add terminating entry for + men_z188_ids + +From: Axel Lin + +commit fbbba1f89eb68e7d07707e104193d56de8e37fe5 upstream. + +The mcb_device_id table is supposed to be zero-terminated. + +Signed-off-by: Axel Lin +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/adc/men_z188_adc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/iio/adc/men_z188_adc.c ++++ b/drivers/iio/adc/men_z188_adc.c +@@ -152,6 +152,7 @@ static void men_z188_remove(struct mcb_d + + static const struct mcb_device_id men_z188_ids[] = { + { .device = 0xbc }, ++ { } + }; + MODULE_DEVICE_TABLE(mcb, men_z188_ids); + diff --git a/queue-3.17/iio-fix-iio_event_code_extract_dir-bit-mask.patch b/queue-3.17/iio-fix-iio_event_code_extract_dir-bit-mask.patch new file mode 100644 index 00000000000..3a9484cb72c --- /dev/null +++ b/queue-3.17/iio-fix-iio_event_code_extract_dir-bit-mask.patch @@ -0,0 +1,32 @@ +From ccf54555da9a5e91e454b909ca6a5303c7d6b910 Mon Sep 17 00:00:00 2001 +From: Cristina Ciocan +Date: Tue, 11 Nov 2014 16:07:42 +0200 +Subject: iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask + +From: Cristina Ciocan + +commit ccf54555da9a5e91e454b909ca6a5303c7d6b910 upstream. + +The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask +in order to retrieve it, that is 0x7F, not 0xCF as it is now. + +Fixes: ade7ef7ba (staging:iio: Differential channel handling) +Signed-off-by: Cristina Ciocan +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/iio/events.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/iio/events.h ++++ b/include/linux/iio/events.h +@@ -72,7 +72,7 @@ struct iio_event_data { + + #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF) + +-#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF) ++#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F) + + #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF) + diff --git a/queue-3.17/of-base-fix-powerpc-address-parsing-hack.patch b/queue-3.17/of-base-fix-powerpc-address-parsing-hack.patch new file mode 100644 index 00000000000..9aa2f5aa867 --- /dev/null +++ b/queue-3.17/of-base-fix-powerpc-address-parsing-hack.patch @@ -0,0 +1,67 @@ +From 746c9e9f92dde2789908e51a354ba90a1962a2eb Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt +Date: Fri, 14 Nov 2014 17:55:03 +1100 +Subject: of/base: Fix PowerPC address parsing hack + +From: Benjamin Herrenschmidt + +commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream. + +We have a historical hack that treats missing ranges properties as the +equivalent of an empty one. This is needed for ancient PowerMac "bad" +device-trees, and shouldn't be enabled for any other PowerPC platform, +otherwise we get some nasty layout of devices in sysfs or even +duplication when a set of otherwise identically named devices is +created multiple times under a different parent node with no ranges +property. + +This fix is needed for the PowerNV i2c busses to be exposed properly +and will fix a number of other embedded cases. + +Signed-off-by: Benjamin Herrenschmidt +Acked-by: Grant Likely +Signed-off-by: Rob Herring +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/of/address.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +--- a/drivers/of/address.c ++++ b/drivers/of/address.c +@@ -403,6 +403,21 @@ static struct of_bus *of_match_bus(struc + return NULL; + } + ++static int of_empty_ranges_quirk(void) ++{ ++ if (IS_ENABLED(CONFIG_PPC)) { ++ /* To save cycles, we cache the result */ ++ static int quirk_state = -1; ++ ++ if (quirk_state < 0) ++ quirk_state = ++ of_machine_is_compatible("Power Macintosh") || ++ of_machine_is_compatible("MacRISC"); ++ return quirk_state; ++ } ++ return false; ++} ++ + static int of_translate_one(struct device_node *parent, struct of_bus *bus, + struct of_bus *pbus, __be32 *addr, + int na, int ns, int pna, const char *rprop) +@@ -428,12 +443,10 @@ static int of_translate_one(struct devic + * This code is only enabled on powerpc. --gcl + */ + ranges = of_get_property(parent, rprop, &rlen); +-#if !defined(CONFIG_PPC) +- if (ranges == NULL) { ++ if (ranges == NULL && !of_empty_ranges_quirk()) { + pr_err("OF: no ranges; cannot translate\n"); + return 1; + } +-#endif /* !defined(CONFIG_PPC) */ + if (ranges == NULL || rlen == 0) { + offset = of_read_number(addr, na); + memset(addr, 0, pna * 4); diff --git a/queue-3.17/powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch b/queue-3.17/powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch new file mode 100644 index 00000000000..bd59011363f --- /dev/null +++ b/queue-3.17/powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch @@ -0,0 +1,34 @@ +From 152d44a853e42952f6c8a504fb1f8eefd21fd5fd Mon Sep 17 00:00:00 2001 +From: Anton Blanchard +Date: Thu, 27 Nov 2014 08:11:28 +1100 +Subject: powerpc: 32 bit getcpu VDSO function uses 64 bit instructions + +From: Anton Blanchard + +commit 152d44a853e42952f6c8a504fb1f8eefd21fd5fd upstream. + +I used some 64 bit instructions when adding the 32 bit getcpu VDSO +function. Fix it. + +Fixes: 18ad51dd342a ("powerpc: Add VDSO version of getcpu") +Signed-off-by: Anton Blanchard +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/vdso32/getcpu.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/powerpc/kernel/vdso32/getcpu.S ++++ b/arch/powerpc/kernel/vdso32/getcpu.S +@@ -30,8 +30,8 @@ + V_FUNCTION_BEGIN(__kernel_getcpu) + .cfi_startproc + mfspr r5,SPRN_SPRG_VDSO_READ +- cmpdi cr0,r3,0 +- cmpdi cr1,r4,0 ++ cmpwi cr0,r3,0 ++ cmpwi cr1,r4,0 + clrlwi r6,r5,16 + rlwinm r7,r5,16,31-15,31-0 + beq cr0,1f diff --git a/queue-3.17/powerpc-powernv-fix-the-hmi-event-version-check.patch b/queue-3.17/powerpc-powernv-fix-the-hmi-event-version-check.patch new file mode 100644 index 00000000000..72acea4d49e --- /dev/null +++ b/queue-3.17/powerpc-powernv-fix-the-hmi-event-version-check.patch @@ -0,0 +1,42 @@ +From 6acbc5a1dab30aa8f7be7bf3852f343f89147ac5 Mon Sep 17 00:00:00 2001 +From: Mahesh Salgaonkar +Date: Thu, 20 Nov 2014 09:44:36 +0530 +Subject: powerpc/powernv: Fix the hmi event version check. + +From: Mahesh Salgaonkar + +commit 6acbc5a1dab30aa8f7be7bf3852f343f89147ac5 upstream. + +The current HMI event structure is an ABI and carries a version field to +accommodate future changes without affecting/rearranging current structure +members that are valid for previous versions. + +The current version check "if (hmi_evt->version != OpalHMIEvt_V1)" +doesn't accomodate the fact that the version number may change in +future. + +If firmware starts returning an HMI event with version > 1, this check +will fail and no HMI information will be printed on older kernels. + +This patch fixes this issue. + +Signed-off-by: Mahesh Salgaonkar +[mpe: Reword changelog] +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/powernv/opal-hmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/powernv/opal-hmi.c ++++ b/arch/powerpc/platforms/powernv/opal-hmi.c +@@ -57,7 +57,7 @@ static void print_hmi_event_info(struct + }; + + /* Print things out */ +- if (hmi_evt->version != OpalHMIEvt_V1) { ++ if (hmi_evt->version < OpalHMIEvt_V1) { + pr_err("HMI Interrupt, Unknown event version %d !\n", + hmi_evt->version); + return; diff --git a/queue-3.17/powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch b/queue-3.17/powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch new file mode 100644 index 00000000000..c02b981adb1 --- /dev/null +++ b/queue-3.17/powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch @@ -0,0 +1,35 @@ +From 360d88a9e3fba596a12520b242fbab1c45b983e1 Mon Sep 17 00:00:00 2001 +From: Gavin Shan +Date: Tue, 25 Nov 2014 09:26:59 +1100 +Subject: powerpc/powernv: Replace OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE + +From: Gavin Shan + +commit 360d88a9e3fba596a12520b242fbab1c45b983e1 upstream. + +The flag passed to ioda_eeh_phb_reset() should be EEH_RESET_DEACTIVATE, +which is translated to OPAL_DEASSERT_RESET or something else by the +EEH backend accordingly. + +The patch replaces OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE for +ioda_eeh_phb_reset(). + +Signed-off-by: Gavin Shan +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/powernv/pci-ioda.c ++++ b/arch/powerpc/platforms/powernv/pci-ioda.c +@@ -1815,7 +1815,7 @@ void __init pnv_pci_init_ioda_phb(struct + if (is_kdump_kernel()) { + pr_info(" Issue PHB reset ...\n"); + ioda_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL); +- ioda_eeh_phb_reset(hose, OPAL_DEASSERT_RESET); ++ ioda_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE); + } + + /* Configure M64 window */ diff --git a/queue-3.17/powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch b/queue-3.17/powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch new file mode 100644 index 00000000000..261516c8b67 --- /dev/null +++ b/queue-3.17/powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch @@ -0,0 +1,65 @@ +From 3b8a3c01096925a824ed3272601082289d9c23a5 Mon Sep 17 00:00:00 2001 +From: Laurent Dufour +Date: Mon, 24 Nov 2014 15:07:53 +0100 +Subject: powerpc/pseries: Fix endiannes issue in RTAS call from xmon + +From: Laurent Dufour + +commit 3b8a3c01096925a824ed3272601082289d9c23a5 upstream. + +On pseries system (LPAR) xmon failed to enter when running in LE mode, +system is hunging. Inititating xmon will lead to such an output on the +console: + +SysRq : Entering xmon +cpu 0x15: Vector: 0 at [c0000003f39ffb10] + pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70 + lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70 + sp: c0000003f39ffc70 + msr: 8000000000009033 + current = 0xc0000003fafa7180 + paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01 + pid = 14617, comm = bash +Bad kernel stack pointer fafb4b0 at eca7cc4 +cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40] + pc: 000000000eca7cc4 + lr: 000000000eca7c44 + sp: fafb4b0 + msr: 8000000000001000 + dar: 10000000 + dsisr: 42000000 + current = 0xc0000003fafa7180 + paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01 + pid = 14617, comm = bash +cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop +xmon: WARNING: bad recursive fault on cpu 0x15 + +The root cause is that xmon is calling RTAS to turn off the surveillance +when entering xmon, and RTAS is requiring big endian parameters. + +This patch is byte swapping the RTAS arguments when running in LE mode. + +Signed-off-by: Laurent Dufour +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/xmon/xmon.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/powerpc/xmon/xmon.c ++++ b/arch/powerpc/xmon/xmon.c +@@ -293,10 +293,10 @@ static inline void disable_surveillance( + args.token = rtas_token("set-indicator"); + if (args.token == RTAS_UNKNOWN_SERVICE) + return; +- args.nargs = 3; +- args.nret = 1; ++ args.nargs = cpu_to_be32(3); ++ args.nret = cpu_to_be32(1); + args.rets = &args.args[3]; +- args.args[0] = SURVEILLANCE_TOKEN; ++ args.args[0] = cpu_to_be32(SURVEILLANCE_TOKEN); + args.args[1] = 0; + args.args[2] = 0; + enter_rtas(__pa(&args)); diff --git a/queue-3.17/powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch b/queue-3.17/powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch new file mode 100644 index 00000000000..6b8173b7a2c --- /dev/null +++ b/queue-3.17/powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch @@ -0,0 +1,29 @@ +From 415072a041bf50dbd6d56934ffc0cbbe14c97be8 Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt +Date: Tue, 7 Oct 2014 16:12:55 +1100 +Subject: powerpc/pseries: Honor the generic "no_64bit_msi" flag + +From: Benjamin Herrenschmidt + +commit 415072a041bf50dbd6d56934ffc0cbbe14c97be8 upstream. + +Instead of the arch specific quirk which we are deprecating + +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/msi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/pseries/msi.c ++++ b/arch/powerpc/platforms/pseries/msi.c +@@ -429,7 +429,7 @@ static int rtas_setup_msi_irqs(struct pc + */ + again: + if (type == PCI_CAP_ID_MSI) { +- if (pdn->force_32bit_msi) { ++ if (pdev->no_64bit_msi) { + rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec); + if (rc < 0) { + /* diff --git a/queue-3.17/series b/queue-3.17/series index 43c75a97cd5..ec490baf437 100644 --- a/queue-3.17/series +++ b/queue-3.17/series @@ -28,3 +28,24 @@ net-mlx4_en-add-vxlan-ndo-calls-to-the-pf-net-device-ops-too.patch net-mlx4_en-advertize-encapsulation-offloads-features-only-when-vxlan-tunnel-is-set.patch pci-support-64-bit-bridge-windows-if-we-have-64-bit-dma_addr_t.patch pci-msi-add-device-flag-indicating-that-64-bit-msis-don-t-work.patch +clockevent-sun4i-fix-race-condition-in-the-probe-code.patch +ib-isert-adjust-cq-size-to-hw-limits.patch +ib_isert-add-max_send_sge-2-minimum-for-control-pdu-responses.patch +asoc-rsnd-remove-unsupported-pause-flag.patch +asoc-fsi-remove-unsupported-pause-flag.patch +asoc-sgtl5000-fix-small_pop-bit-definition.patch +asoc-samsung-add-module_device_table-for-snow.patch +asoc-rockchip-i2s-fix-infinite-loop-in-rockchip_snd_rxctrl.patch +asoc-wm_adsp-avoid-attempt-to-free-buffers-that-might-still-be-in-use.patch +asoc-dpcm-fix-race-between-fe-be-updates-and-trigger.patch +asoc-rt5670-correct-the-incorrect-default-values.patch +asoc-cs42l51-re-hook-of_match_table-pointer.patch +ath9k-fix-rtc_derived_clk-usage.patch +of-base-fix-powerpc-address-parsing-hack.patch +powerpc-pseries-honor-the-generic-no_64bit_msi-flag.patch +powerpc-32-bit-getcpu-vdso-function-uses-64-bit-instructions.patch +powerpc-powernv-replace-opal_deassert_reset-with-eeh_reset_deactivate.patch +powerpc-pseries-fix-endiannes-issue-in-rtas-call-from-xmon.patch +powerpc-powernv-fix-the-hmi-event-version-check.patch +iio-fix-iio_event_code_extract_dir-bit-mask.patch +iio-adc-men_z188_adc-add-terminating-entry-for.patch -- 2.47.3