aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-05-07ALSA: rawmidi: Fix racy buffer resize under concurrent accessesTakashi Iwai1-0/+1
The rawmidi core allows user to resize the runtime buffer via ioctl, and this may lead to UAF when performed during concurrent reads or writes: the read/write functions unlock the runtime lock temporarily during copying form/to user-space, and that's the race window. This patch fixes the hole by introducing a reference counter for the runtime buffer read/write access and returns -EBUSY error when the resize is performed concurrently against read/write. Note that the ref count field is a simple integer instead of refcount_t here, since the all contexts accessing the buffer is basically protected with a spinlock, hence we need no expensive atomic ops. Also, note that this busy check is needed only against read / write functions, and not in receive/transmit callbacks; the race can happen only at the spinlock hole mentioned in the above, while the whole function is protected for receive / transmit callbacks. Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/CAFcO6XMWpUVK_yzzCpp8_XP7+=oUpQvuBeCbMffEDkpe8jWrfg@mail.gmail.com Link: https://lore.kernel.org/r/s5heerw3r5z.wl-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-21Merge tag 'asoc-fix-v5.7-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai2-1/+3
ASoC: Fixes for v5.7 Quite a lot of fixes here, a lot of driver specific ones but the biggest one is the revert of changes to the startup and shutdown sequence for DAIs that went in during the merge window - they broke some older x86 platforms and attempts to fix them didn't succeed so it's safer to just roll them back and try to make sure those platforms are handled properly in any future attempt. The rockchip S/PDIF DT stuff was IIRC for validation issues.
2020-04-15ASoC: soc-dai: revert all changes to DAI startup/shutdown sequencePierre-Louis Bossart1-1/+0
On Baytrail/Cherrytrail, the Atom/SST driver fails miserably: [ 9.741953] intel_sst_acpi 80860F28:00: FW Version 01.0c.00.01 [ 9.832992] intel_sst_acpi 80860F28:00: FW sent error response 0x40034 [ 9.833019] intel_sst_acpi 80860F28:00: FW alloc failed ret -4 [ 9.833028] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5 [ 9.833033] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5 [ 9.833037] Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed [ 9.853942] intel_sst_acpi 80860F28:00: FW sent error response 0x40034 [ 9.853974] intel_sst_acpi 80860F28:00: FW alloc failed ret -4 [ 9.853984] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5 [ 9.853990] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5 [ 9.853994] Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed Commit b56be800f1292 ("ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once") was the initial problematic commit. Commit 1ba616bd1a6d5e ("ASoC: soc-dai: fix DAI startup/shutdown sequence") was an attempt to fix things but it does not work on Baytrail, reverting all changes seems necessary for now. Fixes: 1ba616bd1a6d5e ("ASoC: soc-dai: fix DAI startup/shutdown sequence") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200415030437.23803-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-14ASoC: dapm: Fix regression introducing multiple copies of DAI widgetsCharles Keepax1-0/+3
Refactoring was done to factor out the linking of DAI widgets into a helper function, dapm_add_valid_dai_widget. However when this was done, a regression was introduced for CODEC to CODEC links. It was over looked that the playback and capture variables persisted across all CODEC DAIs being processed, which ensured that the special DAI widget that is added for CODEC to CODEC links was only created once. This bug causes kernel panics during DAPM shutdown. To stick with the spirit of the original refactoring whilst fixing the issue, variables to hold the DAI widgets are added to snd_soc_dai_link. Furthermore the dapm_add_valid_dai_widget function is renamed to dapm_connect_dai_pair, the function only adds DAI widgets in the CODEC to CODEC case and its primary job is to add routes connecting two DAI widgets, making the original name quite misleading. Fixes: 6c4b13b51aa3 ("ASoC: Add dapm_add_valid_dai_widget helper") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200409181209.30130-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-13ALSA: hda: Skip controller resume if not neededTakashi Iwai1-0/+5
The HD-audio controller does system-suspend and resume operations by directly calling its helpers __azx_runtime_suspend() and __azx_runtime_resume(). However, in general, we don't have to resume always the device fully at the system resume; typically, if a device has been runtime-suspended, we can leave it to runtime resume. Usually for achieving this, the driver would call pm_runtime_force_suspend() and pm_runtime_force_resume() pairs in the system suspend and resume ops. Unfortunately, this doesn't work for the resume path in our case. For handling the jack detection at the system resume, a child codec device may need the (literally) forcibly resume even if it's been runtime-suspended, and for that, the controller device must be also resumed even if it's been suspended. This patch is an attempt to improve the situation. It replaces the direct __azx_runtime_suspend()/_resume() calls with with pm_runtime_force_suspend() and pm_runtime_force_resume() with a slight trick as we've done for the codec side. More exactly: - azx_has_pm_runtime() check is dropped from azx_runtime_suspend() and azx_runtime_resume(), so that it can be properly executed from the system-suspend/resume path - The WAKEEN handling depends on the card's power state now; it's set and cleared only for the runtime-suspend - azx_resume() checks whether any codec may need the forcible resume beforehand. If the forcible resume is required, it does temporary PM refcount up/down for actually triggering the runtime resume. - A new helper function, hda_codec_need_resume(), is introduced for checking whether the codec needs a forcible runtime-resume, and the existing code is rewritten with that. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043 Link: https://lore.kernel.org/r/20200413082034.25166-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-08Merge tag 'asoc-fix-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai1-1/+1
ASoC: Fixes for v5.7 A collection of fixes that have been accumilated since the merge window, mainly relating to x86 platform support.
2020-03-31Revert "ALSA: uapi: Drop asound.h inclusion from asoc.h"Takashi Iwai1-0/+1
This reverts commit 645c08f17f477915f6d900b767e789852f150054 which was reported to break the build a program using this header. The original issue was addressed in the alsa-lib side recently, so we can make the header more self-contained again. Reported-by: Dmitry V. Levin <ldv@altlinux.org> Fixes: 645c08f17f47 ("ALSA: uapi: Drop asound.h inclusion from asoc.h") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200331090023.8112-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-03-30ASoC: soc-dai: fix DAI startup/shutdown sequencePierre-Louis Bossart1-1/+1
The addition of a single flag to track the DAI status prevents the DAI startup sequence from being called on capture if the DAI is already used for playback. Fix by extending the existing code with one flag per direction. Fixes: b56be800f1292 ("ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once") Reported-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20200330160602.10180-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-30Merge tag 'asoc-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai91-494/+609
ASoC: Updates for v5.7 This is a very big update for the core since Morimoto-san has been rather busy continuing his refactorings to clean up a lot of the cruft that we have accumilated over the years. We've also gained several new drivers, including initial (but still not complete) parts of the Intel SoundWire support. - Lots of refactorings to modernize the code from Morimoto-san. - Conversion of SND_SOC_ALL_CODECS to use imply from Geert Uytterhoeven. - Continued refactoring and fixing of the Intel support. - Soundwire and more advanced clocking support for Realtek RT5682. - Support for amlogic GX, Meson 8, Meson 8B and T9015 DAC, Broadcom DSL/PON, Ingenic JZ4760 and JZ4770, Realtek RL6231, and TI TAS2563 and TLV320ADCX140.
2020-03-27Merge branch 'asoc-5.7' into asoc-nextMark Brown19-72/+271
2020-03-27Merge branch 'asoc-5.6' into asoc-linusMark Brown1-0/+1
2020-03-27Merge series "ASoC: remove rtd->cpu/codec_dai{s}" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:Mark Brown1-0/+4
Hi Mark Now, CPU/Codec DAI(s) were replaced by rtd->dais. Thus, We don't need rtd->cpu/codec_dai{s} anymore. This pathset replaces it by new macro. Kuninori Morimoto (36): ASoC: soc-core: add asoc_rtd_to_cpu/codec() macro ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: au1x: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: bcm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: cirrus: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: generic: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: img: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: kirkwood: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: pxa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: rockchip: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: sof: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: sunxi: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: tegra: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: ti: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: txx9: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: uniphier: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: ux500: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: xtensa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: codecs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer ASoC: soc-core: set rtd->num_cpu/codec at soc_new_pcm_runtime() ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais include/sound/soc.h | 30 +++++++------ sound/arm/pxa2xx-pcm-lib.c | 8 ++-- sound/soc/amd/acp-da7219-max98357a.c | 2 +- sound/soc/amd/acp-rt5645.c | 4 +- sound/soc/amd/acp3x-rt5682-max9836.c | 6 +-- sound/soc/atmel/atmel-pcm-dma.c | 4 +- sound/soc/atmel/atmel-pcm-pdc.c | 2 +- sound/soc/atmel/atmel_wm8904.c | 2 +- sound/soc/atmel/mikroe-proto.c | 2 +- sound/soc/atmel/sam9g20_wm8731.c | 2 +- sound/soc/atmel/sam9x5_wm8731.c | 2 +- sound/soc/au1x/db1200.c | 2 +- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/au1x/psc-ac97.c | 2 +- sound/soc/bcm/bcm63xx-pcm-whistler.c | 16 +++---- sound/soc/bcm/cygnus-pcm.c | 22 +++++----- sound/soc/cirrus/edb93xx.c | 4 +- sound/soc/cirrus/snappercl15.c | 4 +- sound/soc/codecs/cs47l15.c | 4 +- sound/soc/codecs/cs47l24.c | 6 +-- sound/soc/codecs/cs47l35.c | 6 +-- sound/soc/codecs/cs47l85.c | 6 +-- sound/soc/codecs/cs47l90.c | 6 +-- sound/soc/codecs/cs47l92.c | 4 +- sound/soc/codecs/wm5110.c | 6 +-- sound/soc/codecs/wm_adsp.c | 10 ++--- sound/soc/dwc/dwc-pcm.c | 2 +- sound/soc/fsl/eukrea-tlv320.c | 4 +- sound/soc/fsl/fsl-asoc-card.c | 10 ++--- sound/soc/fsl/fsl_asrc_dma.c | 6 +-- sound/soc/fsl/fsl_spdif.c | 10 ++--- sound/soc/fsl/fsl_ssi.c | 8 ++-- sound/soc/fsl/imx-audmix.c | 8 ++-- sound/soc/fsl/imx-mc13783.c | 4 +- sound/soc/fsl/imx-sgtl5000.c | 2 +- sound/soc/fsl/mpc5200_dma.c | 10 ++--- sound/soc/fsl/mpc5200_psc_i2s.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 4 +- sound/soc/fsl/mx27vis-aic32x4.c | 4 +- sound/soc/fsl/p1022_ds.c | 4 +- sound/soc/fsl/p1022_rdk.c | 4 +- sound/soc/fsl/wm1133-ev1.c | 6 +-- sound/soc/generic/simple-card-utils.c | 12 +++--- sound/soc/img/img-i2s-in.c | 2 +- sound/soc/img/img-i2s-out.c | 2 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +-- sound/soc/intel/boards/bdw-rt5650.c | 6 +-- sound/soc/intel/boards/bdw-rt5677.c | 6 +-- sound/soc/intel/boards/broadwell.c | 4 +- sound/soc/intel/boards/bxt_da7219_max98357a.c | 8 ++-- sound/soc/intel/boards/bxt_rt298.c | 8 ++-- sound/soc/intel/boards/byt-max98090.c | 2 +- sound/soc/intel/boards/byt-rt5640.c | 4 +- sound/soc/intel/boards/bytcht_cx2072x.c | 10 ++--- sound/soc/intel/boards/bytcht_da7213.c | 8 ++-- sound/soc/intel/boards/bytcht_es8316.c | 8 ++-- sound/soc/intel/boards/bytcht_nocodec.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 8 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 8 ++-- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +-- sound/soc/intel/boards/cht_bsw_nau8824.c | 4 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 14 +++---- sound/soc/intel/boards/cht_bsw_rt5672.c | 8 ++-- sound/soc/intel/boards/cml_rt1011_rt5682.c | 6 +-- sound/soc/intel/boards/glk_rt5682_max98357a.c | 10 ++--- sound/soc/intel/boards/haswell.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98357a.c | 8 ++-- sound/soc/intel/boards/kbl_da7219_max98927.c | 6 +-- sound/soc/intel/boards/kbl_rt5660.c | 6 +-- sound/soc/intel/boards/kbl_rt5663_max98927.c | 8 ++-- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 8 ++-- .../soc/intel/boards/skl_nau88l25_max98357a.c | 12 +++--- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 16 +++---- sound/soc/intel/boards/skl_rt286.c | 8 ++-- sound/soc/intel/boards/sof_da7219_max98373.c | 8 ++-- sound/soc/intel/boards/sof_pcm512x.c | 8 ++-- sound/soc/intel/boards/sof_rt5682.c | 6 +-- sound/soc/intel/haswell/sst-haswell-pcm.c | 26 ++++++------ sound/soc/intel/skylake/skl-pcm.c | 10 ++--- sound/soc/kirkwood/armada-370-db.c | 2 +- sound/soc/kirkwood/kirkwood-dma.c | 2 +- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 10 ++--- .../mediatek/common/mtk-afe-platform-driver.c | 2 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 4 +- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 4 +- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 2 +- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 4 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 4 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 6 +-- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 2 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 4 +- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 2 +- sound/soc/meson/aiu-fifo.c | 2 +- sound/soc/meson/axg-card.c | 8 ++-- sound/soc/meson/axg-fifo.c | 2 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/mxs/mxs-sgtl5000.c | 4 +- sound/soc/pxa/brownstone.c | 4 +- sound/soc/pxa/corgi.c | 4 +- sound/soc/pxa/hx4700.c | 4 +- sound/soc/pxa/imote2.c | 4 +- sound/soc/pxa/magician.c | 8 ++-- sound/soc/pxa/mioa701_wm9713.c | 4 +- sound/soc/pxa/mmp-pcm.c | 2 +- sound/soc/pxa/mmp-sspa.c | 2 +- sound/soc/pxa/poodle.c | 4 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/spitz.c | 4 +- sound/soc/pxa/ttc-dkb.c | 2 +- sound/soc/pxa/z2.c | 4 +- sound/soc/pxa/zylonite.c | 6 +-- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/apq8096.c | 6 +-- sound/soc/qcom/lpass-platform.c | 2 +- sound/soc/qcom/qdsp6/q6asm-dai.c | 4 +- sound/soc/qcom/qdsp6/q6routing.c | 2 +- sound/soc/qcom/sdm845.c | 22 +++++----- sound/soc/qcom/storm.c | 2 +- sound/soc/rockchip/rk3288_hdmi_analog.c | 4 +- sound/soc/rockchip/rk3399_gru_sound.c | 16 +++---- sound/soc/rockchip/rockchip_max98090.c | 6 +-- sound/soc/rockchip/rockchip_rt5645.c | 6 +-- sound/soc/samsung/arndale.c | 6 +-- sound/soc/samsung/bells.c | 16 +++---- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/jive_wm8750.c | 4 +- sound/soc/samsung/littlemill.c | 14 +++---- sound/soc/samsung/lowland.c | 4 +- sound/soc/samsung/neo1973_wm8753.c | 10 ++--- sound/soc/samsung/odroid.c | 2 +- sound/soc/samsung/pcm.c | 4 +- sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c24xx_simtec.c | 4 +- sound/soc/samsung/s3c24xx_uda134x.c | 6 +-- sound/soc/samsung/smartq_wm8987.c | 4 +- sound/soc/samsung/smdk_spdif.c | 2 +- sound/soc/samsung/smdk_wm8580.c | 2 +- sound/soc/samsung/smdk_wm8994.c | 2 +- sound/soc/samsung/smdk_wm8994pcm.c | 4 +- sound/soc/samsung/snow.c | 4 +- sound/soc/samsung/spdif.c | 8 ++-- sound/soc/samsung/speyside.c | 8 ++-- sound/soc/samsung/tm2_wm5110.c | 16 +++---- sound/soc/samsung/tobermory.c | 8 ++-- sound/soc/sh/dma-sh7760.c | 16 +++---- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/migor.c | 6 +-- sound/soc/sh/rcar/core.c | 2 +- sound/soc/soc-compress.c | 36 ++++++++-------- sound/soc/soc-core.c | 42 +++++++------------ sound/soc/soc-dapm.c | 4 +- sound/soc/soc-generic-dmaengine-pcm.c | 6 +-- sound/soc/soc-pcm.c | 30 ++++++------- sound/soc/sof/intel/hda-dai.c | 6 +-- sound/soc/sof/intel/hda-dsp.c | 2 +- sound/soc/sprd/sprd-pcm-compress.c | 4 +- sound/soc/sprd/sprd-pcm-dma.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 12 +++--- sound/soc/stm/stm32_sai_sub.c | 2 +- sound/soc/sunxi/sun4i-spdif.c | 2 +- sound/soc/tegra/tegra_alc5632.c | 2 +- sound/soc/tegra/tegra_max98090.c | 2 +- sound/soc/tegra/tegra_rt5640.c | 2 +- sound/soc/tegra/tegra_rt5677.c | 2 +- sound/soc/tegra/tegra_sgtl5000.c | 2 +- sound/soc/tegra/tegra_wm8753.c | 2 +- sound/soc/tegra/tegra_wm8903.c | 6 +-- sound/soc/tegra/trimslice.c | 2 +- sound/soc/ti/ams-delta.c | 4 +- sound/soc/ti/davinci-evm.c | 4 +- sound/soc/ti/davinci-vcif.c | 4 +- sound/soc/ti/n810.c | 2 +- sound/soc/ti/omap-abe-twl6040.c | 6 +-- sound/soc/ti/omap-mcbsp-st.c | 2 +- sound/soc/ti/omap-mcbsp.c | 4 +- sound/soc/ti/omap-mcpdm.c | 2 +- sound/soc/ti/omap3pandora.c | 4 +- sound/soc/ti/osk5912.c | 2 +- sound/soc/ti/rx51.c | 2 +- sound/soc/txx9/txx9aclc.c | 2 +- sound/soc/uniphier/aio-compress.c | 22 +++++----- sound/soc/uniphier/aio-dma.c | 6 +-- sound/soc/ux500/mop500_ab8500.c | 6 +-- sound/soc/ux500/ux500_pcm.c | 8 ++-- sound/soc/xtensa/xtfpga-i2s.c | 2 +- 191 files changed, 573 insertions(+), 577 deletions(-) -- 2.17.1
2020-03-27ASoC: SOF: IPC: dai-intel: move ALH declarations in header filePierre-Louis Bossart1-9/+9
ALH was inserted in the wrong place during integration, add after DMIC to mirror the file used by SOF firmware. No functional change, just text move in the same file to better track changes, if any. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200325215027.28716-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: soc-acpi: expand description of _ADR-based devicesPierre-Louis Bossart1-6/+33
For SoundWire, we need to know if endpoints needs to be 'aggregated' (MIPI parlance, meaning logically grouped), e.g. when two speaker amplifiers need to be handled as a single logical output. We don't necessarily have the information at the firmware (BIOS) level, so add a notion of endpoints and specify if a device/endpoint is part of a group, with a position. This may be expanded in future solutions, for now only provide a group and position information. Since we modify the header file, change all existing upstream tables as well to avoid breaking compilation/bisect. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200325215027.28716-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: soc-core: add asoc_rtd_to_cpu/codec() macroKuninori Morimoto1-0/+4
Now, snd_soc_pcm_runtime supports multi cpu_dai/codec_dai. It still has cpu_dai/codec_dai for single DAI, and has cpu_dais/codec_dais for multi DAIs. dais = [][][][][][][][][][][][][][][][][][] ^cpu_dais ^codec_dais |--- num_cpus ---|--- num_codecs --| /* for multi DAIs */ rtd->cpu_dais = &rtd->dais[0]; rtd->codec_dais = &rtd->dais[dai_link->num_cpus]; /* for single DAI */ rtd->cpu_dai = rtd->cpu_dais[0]; rtd->codec_dai = rtd->codec_dais[0]; But, these can be replaced by dais. This patch adds asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/875zevk5va.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-23ASoC: rt5682: Add a property for DMIC delayOder Chiou1-0/+1
The patch adds a property for DMIC delay (ms) to avoid pop noise and changes the default delay setting. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200323082547.7898-2-oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-23ASoC: rt5682: Add a property for DMIC clock rateOder Chiou1-0/+1
The patch adds a property for DMIC clock rate (hz) and changes the default to the common optimize DMIC clock rate. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200323082547.7898-1-oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-23ALSA: core: Add snd_device_get_state() helperTakashi Iwai1-0/+1
A new small helper to get the current state of the device registration for the given object. It'll be used for USB-audio driver to check the delayed device registrations. Link: https://lore.kernel.org/r/20200323170643.19181-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-03-22Merge branch 'akpm' (patches from Andrew)Linus Torvalds2-3/+4
Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: x86/mm: split vmalloc_sync_all() mm, slub: prevent kmalloc_node crashes and memory leaks mm/mmu_notifier: silence PROVE_RCU_LIST warnings epoll: fix possible lost wakeup on epoll_ctl() path mm: do not allow MADV_PAGEOUT for CoW pages mm, memcg: throttle allocators based on ancestral memory.high mm, memcg: fix corruption on 64-bit divisor in memory.high throttling page-flags: fix a crash at SetPageError(THP_SWAP) mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
2020-03-21x86/mm: split vmalloc_sync_all()Joerg Roedel1-2/+3
Commit 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") introduced a call to vmalloc_sync_all() in the vunmap() code-path. While this change was necessary to maintain correctness on x86-32-pae kernels, it also adds additional cycles for architectures that don't need it. Specifically on x86-64 with CONFIG_VMAP_STACK=y some people reported severe performance regressions in micro-benchmarks because it now also calls the x86-64 implementation of vmalloc_sync_all() on vunmap(). But the vmalloc_sync_all() implementation on x86-64 is only needed for newly created mappings. To avoid the unnecessary work on x86-64 and to gain the performance back, split up vmalloc_sync_all() into two functions: * vmalloc_sync_mappings(), and * vmalloc_sync_unmappings() Most call-sites to vmalloc_sync_all() only care about new mappings being synchronized. The only exception is the new call-site added in the above mentioned commit. Shile Zhang directed us to a report of an 80% regression in reaim throughput. Fixes: 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") Reported-by: kernel test robot <oliver.sang@intel.com> Reported-by: Shile Zhang <shile.zhang@linux.alibaba.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Tested-by: Borislav Petkov <bp@suse.de> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [GHES] Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20191009124418.8286-1-joro@8bytes.org Link: https://lists.01.org/hyperkitty/list/lkp@lists.01.org/thread/4D3JPPHBNOSPFK2KEPC6KGKS6J25AIDB/ Link: http://lkml.kernel.org/r/20191113095530.228959-1-shile.zhang@linux.alibaba.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-03-21page-flags: fix a crash at SetPageError(THP_SWAP)Qian Cai1-1/+1
Commit bd4c82c22c36 ("mm, THP, swap: delay splitting THP after swapped out") supported writing THP to a swap device but forgot to upgrade an older commit df8c94d13c7e ("page-flags: define behavior of FS/IO-related flags on compound pages") which could trigger a crash during THP swapping out with DEBUG_VM_PGFLAGS=y, kernel BUG at include/linux/page-flags.h:317! page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page)) page:fffff3b2ec3a8000 refcount:512 mapcount:0 mapping:000000009eb0338c index:0x7f6e58200 head:fffff3b2ec3a8000 order:9 compound_mapcount:0 compound_pincount:0 anon flags: 0x45fffe0000d8454(uptodate|lru|workingset|owner_priv_1|writeback|head|reclaim|swapbacked) end_swap_bio_write() SetPageError(page) VM_BUG_ON_PAGE(1 && PageCompound(page)) <IRQ> bio_endio+0x297/0x560 dec_pending+0x218/0x430 [dm_mod] clone_endio+0xe4/0x2c0 [dm_mod] bio_endio+0x297/0x560 blk_update_request+0x201/0x920 scsi_end_request+0x6b/0x4b0 scsi_io_completion+0x509/0x7e0 scsi_finish_command+0x1ed/0x2a0 scsi_softirq_done+0x1c9/0x1d0 __blk_mqnterrupt+0xf/0x20 </IRQ> Fix by checking PF_NO_TAIL in those places instead. Fixes: bd4c82c22c36 ("mm, THP, swap: delay splitting THP after swapped out") Signed-off-by: Qian Cai <cai@lca.pw> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: "Huang, Ying" <ying.huang@intel.com> Acked-by: Rafael Aquini <aquini@redhat.com> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20200310235846.1319-1-cai@lca.pw Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-03-21Merge tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-blockLinus Torvalds2-1/+3
Pull io_uring fixes from Jens Axboe: "Two different fixes in here: - Fix for a potential NULL pointer deref for links with async or drain marked (Pavel) - Fix for not properly checking RLIMIT_NOFILE for async punted operations. This affects openat/openat2, which were added this cycle, and accept4. I did a full audit of other cases where we might check current->signal->rlim[] and found only RLIMIT_FSIZE for buffered writes and fallocate. That one is fixed and queued for 5.7 and marked stable" * tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-block: io_uring: make sure accept honor rlimit nofile io_uring: make sure openat/openat2 honor rlimit nofile io_uring: NULL-deref for IOSQE_{ASYNC,DRAIN}
2020-03-20ASoC: soc-core: Merge CPU/Codec DAIsKuninori Morimoto1-1/+6
ALSA SoC is currently categorizing CPU/Codec DAIs, and it works well. But modern devices require more complex connections, for example Codec to Codec, etc, and future devices will enable to more complex connections. Because of these background, CPU/Codec DAIs categorizing is no longer good much to modern device. Currently, rtd has both CPU/Codec DAIs pointer. rtd->cpu_dais = [][][][][][][][][] rtd->codec_dais = [][][][][][][][][] This patch merges these into DAIs pointer. rtd->dais = [][][][][][][][][][][][][][][][][][] ^cpu_dais ^codec_dais |--- num_cpus ---|--- num_codecs --| Then, we can merge for_each_rtd_cpu/codec_dais() from this patch. - for_each_rtd_cpu_dais() { - ... - } - for_each_rtd_codec_dais() { - ... - } + for_each_rtd_dais() { + ... + } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87wo7kolfa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-20Merge branch 'topic/ro_wordlength' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into asoc-5.7Mark Brown1-0/+2
2020-03-20io_uring: make sure accept honor rlimit nofileJens Axboe1-1/+2
Just like commit 4022e7af86be, this fixes the fact that IORING_OP_ACCEPT ends up using get_unused_fd_flags(), which checks current->signal->rlim[] for limits. Add an extra argument to __sys_accept4_file() that allows us to pass in the proper nofile limit, and grab it at request prep time. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-20io_uring: make sure openat/openat2 honor rlimit nofileJens Axboe1-0/+1
Dmitry reports that a test case shows that io_uring isn't honoring a modified rlimit nofile setting. get_unused_fd_flags() checks the task signal->rlimi[] for the limits. As this isn't easily inheritable, provide a __get_unused_fd_flags() that takes the value instead. Then we can grab it when the request is prepared (from the original task), and pass that in when we do the async part part of the open. Reported-by: Dmitry Kadashev <dkadashev@gmail.com> Tested-by: Dmitry Kadashev <dkadashev@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-20soundwire: stream: Add read_only_wordlength flag to port propertiesSrinivas Kandagatla1-0/+2
According to SoundWire Specification Version 1.2. "A Data Port number X (in the range 0-14) which supports only one value of WordLength may implement the WordLength field in the DPX_BlockCtrl1 Register as Read-Only, returning the fixed value of WordLength in response to reads." As WSA881x interfaces in PDM mode making the only field "WordLength" in DPX_BlockCtrl1" fixed and read-only. Behaviour of writing to this register on WSA881x soundwire slave with Qualcomm Soundwire Controller is throwing up an error. Not sure how other controllers deal with writing to readonly registers, but this patch provides a way to avoid writes to DPN_BlockCtrl1 register by providing a read_only_wordlength flag in struct sdw_dpn_prop Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200311113545.23773-2-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-03-16Merge series "ALSA: compress: Add wma, alac and ape support" from Vinod Koul <vkoul@kernel.org>:Mark Brown2-2/+37
This series adds more WMA profiles and WMA decoder parameters to UAPI and then support for these in qcom driver. It also adds FLAC and APE IDs and decoder parameters to UAPI and then support in qcom driver This was tested on Dragon board RB3. Last, bump up the compressed version so that userspace can check for the support. Since the series touches compress uapi and asoc, it would make sense to go thru asoc tree with acks. Changes in v3: - add r-b from Srini - use macros for FLAC channel layout tags Changes in v2: - use bitflags for wma profiles Vinod Koul (9): ALSA: compress: add wma codec profiles ALSA: compress: Add wma decoder params ASoC: qcom: q6asm: pass codec profile to q6asm_open_write ASoC: qcom: q6asm: add support to wma config ASoC: qcom: q6asm-dai: add support to wma decoder ALSA: compress: add alac & ape decoder params ASoC: qcom: q6asm: add support for alac and ape configs ASoC: qcom: q6asm-dai: add support for ALAC and APE decoders ALSA: compress: bump the version include/uapi/sound/compress_offload.h | 2 +- include/uapi/sound/compress_params.h | 37 +++- sound/soc/qcom/qdsp6/q6asm-dai.c | 139 ++++++++++++++- sound/soc/qcom/qdsp6/q6asm.c | 243 +++++++++++++++++++++++++- sound/soc/qcom/qdsp6/q6asm.h | 51 +++++- 5 files changed, 465 insertions(+), 7 deletions(-) -- 2.24.1
2020-03-16ASoC: soc-dai: return proper error for get_sdw_stream()Srinivas Kandagatla1-2/+2
snd_soc_dai_get_sdw_stream() returns null if dai does not support this callback, this is no very useful for the caller to differentiate if this is an error or unsupported call for the dai. return -ENOTSUPP in cases where this callback is not supported. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200316151110.2580-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-16ALSA: compress: bump the versionVinod Koul1-1/+1
We have added support for bunch of new decoders and parameters for decoders. To help users find the support bump the version up to 0,2,0. Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-10-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-16ALSA: compress: add alac & ape decoder paramsVinod Koul1-1/+25
Add ALAC (Apple Lossless Audio Codec) and APE (Monkey's Lossless Audio Codec) defines and parameters required to configure these. Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-7-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-16ALSA: compress: Add wma decoder paramsVinod Koul1-0/+8
Some WMA decoders like WMAv10 etc need some additional encoder option parameters, so add these as WMA decoder params. Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-3-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-16ALSA: compress: add wma codec profilesVinod Koul1-0/+3
Some codec profiles were missing for WMA, like WMA9/10 lossless and wma10 pro, so add these profiles Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-2-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-15Merge tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds2-7/+11
Pull futex fix from Thomas Gleixner: "Fix for yet another subtle futex issue. The futex code used ihold() to prevent inodes from vanishing, but ihold() does not guarantee inode persistence. Replace the inode pointer with a per boot, machine wide, unique inode identifier. The second commit fixes the breakage of the hash mechanism which causes a 100% performance regression" * tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Unbreak futex hashing futex: Fix inode life-time issue
2020-03-15Merge tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommuLinus Torvalds2-5/+11
Pull IOMMU fixes from Joerg Roedel: - Intel VT-d fixes: - RCU list handling fixes - Replace WARN_TAINT with pr_warn + add_taint for reporting firmware issues - DebugFS fixes - Fix for hugepage handling in iova_to_phys implementation - Fix for handling VMD devices, which have a domain number which doesn't fit into 16 bits - Warning message fix - MSI allocation fix for iommu-dma code - Sign-extension fix for io page-table code - Fix for AMD-Vi to properly update the is-running bit when AVIC is used * tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Populate debugfs if IOMMUs are detected iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE iommu/vt-d: Ignore devices with out-of-spec domain number iommu/vt-d: Fix the wrong printing in RHSA parsing iommu/vt-d: Fix debugfs register reads iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: dmar_parse_one_rmrr: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: Silence RCU-list debugging warnings iommu/vt-d: Fix RCU-list bugs in intel_iommu_init() iommu/dma: Fix MSI reservation allocation iommu/io-pgtable-arm: Fix IOVA validation for 32-bit iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page iommu/vt-d: Fix RCU list debugging warnings
2020-03-14Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linuxLinus Torvalds2-6/+6
Pull clk fixes from Stephen Boyd: "A small collection of fixes. I'll make another sweep soon to look for more fixes for this -rc series. - Mark device node const in of_clk_get_parent APIs to ease landing changes in users later - Fix flag for Qualcomm SC7180 video clocks where we thought it would never turn off but actually hardware takes care of it - Remove disp_cc_mdss_rscc_ahb_clk on Qualcomm SC7180 SoCs because this clk is always on anyway - Correct some bad dt-binding numbers for i.MX8MN SoCs" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx8mn: Fix incorrect clock defines clk: qcom: dispcc: Remove support of disp_cc_mdss_rscc_ahb_clk clk: qcom: videocc: Update the clock flag for video_cc_vcodec0_core_clk of: clk: Make of_clk_get_parent_{count,name}() parameter const
2020-03-13Merge tag 'block-5.6-2020-03-13' of git://git.kernel.dk/linux-blockLinus Torvalds1-12/+1
Pull block fixes from Jens Axboe: "A few fixes that should go into this release. This contains: - Fix for a corruption issue with the s390 dasd driver (Stefan) - Fixup/improvement for the flush insertion change that we had in this series (Ming) - Fix for the partition suppor for host aware zoned devices (Shin'ichiro) - Fix incorrect blk-iocost comparison (Tejun) The diffstat looks large, but that's a) mostly dasd, and b) the flush fix from Ming adds a big comment" * tag 'block-5.6-2020-03-13' of git://git.kernel.dk/linux-block: block: Fix partition support for host aware zoned block devices blk-mq: insert flush request to the front of dispatch queue s390/dasd: fix data corruption for thin provisioned devices blk-iocost: fix incorrect vtime comparison in iocg_is_idle()
2020-03-13Merge tag 'mmc-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmcLinus Torvalds1-0/+1
Pull MMC fixes from Ulf Hansson: "MMC core: - Fix HW busy detection support for host controllers requiring the MMC_RSP_BUSY response flag (R1B) to be set for the command. In particular for CMD6 (eMMC), erase/trim/discard (SD/eMMC) and CMD5 (eMMC sleep). MMC host: - sdhci-omap|tegra: Fix support for HW busy detection" * tag 'mmc-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard mmc: core: Allow host controllers to require R1B for CMD6
2020-03-13Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7Mark Brown1-0/+1
2020-03-13ASoC: SOF: Remove SOF_IPC_EXT_DMA_BUFFERKarol Trzcinski1-17/+1
This enum code, and what's more important, related structures is unused in whole source code, so it shouldn't be kept. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312200622.24477-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-13ASoC: SOF: Make sof_ipc_ext_data enum more rigidKarol Trzcinski1-3/+3
It's a part of ABI interface, so enum value shouldn't change for example after removing some old enum code. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312200622.24477-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-13iommu/vt-d: Fix debugfs register readsMegha Dey1-0/+2
Commit 6825d3ea6cde ("iommu/vt-d: Add debugfs support to show register contents") dumps the register contents for all IOMMU devices. Currently, a 64 bit read(dmar_readq) is done for all the IOMMU registers, even though some of the registers are 32 bits, which is incorrect. Use the correct read function variant (dmar_readl/dmar_readq) while reading the contents of 32/64 bit registers respectively. Signed-off-by: Megha Dey <megha.dey@linux.intel.com> Link: https://lore.kernel.org/r/1583784587-26126-2-git-send-email-megha.dey@linux.intel.com Acked-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2020-03-12Merge tag 'drm-fixes-2020-03-13' of git://anongit.freedesktop.org/drm/drmLinus Torvalds1-2/+2
Pull drm fixes from Dave Airlie: "It's a bit quieter, probably not as much as it could be. There is on large regression fix in here from Lyude for displayport bandwidth calculations, there've been reports of multi-monitor in docks not working since -rc1 and this has been tested to fix those. Otherwise it's a bunch of i915 (with some GVT fixes), a set of amdgpu watermark + bios fixes, and an exynos iommu cleanup fix. core: - DP MST bandwidth regression fix. i915: - hard lockup fix - GVT fixes - 32-bit alignment issue fix - timeline wait fixes - cacheline_retire and free amdgpu: - Update the display watermark bounding box for navi14 - Fix fetching vbios directly from rom on vega20/arcturus - Navi and renoir watermark fixes exynos: - iommu object cleanup fix" ` * tag 'drm-fixes-2020-03-13' of git://anongit.freedesktop.org/drm/drm: drm/dp_mst: Rewrite and fix bandwidth limit checks drm/dp_mst: Reprobe path resources in CSN handler drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks drm/dp_mst: Rename drm_dp_mst_is_dp_mst_end_device() to be less redundant drm/i915: Defer semaphore priority bumping to a workqueue drm/i915/gt: Close race between cacheline_retire and free drm/i915/execlists: Enable timeslice on partial virtual engine dequeue drm/i915: be more solid in checking the alignment drm/i915/gvt: Fix dma-buf display blur issue on CFL drm/i915: Return early for await_start on same timeline drm/i915: Actually emit the await_start drm/amdgpu/powerplay: nv1x, renior copy dcn clock settings of watermark to smu during boot up drm/exynos: Fix cleanup of IOMMU related objects drm/amdgpu: correct ROM_INDEX/DATA offset for VEGA20 drm/amd/display: update soc bb for nv14 drm/i915/gvt: Fix emulated vbt size issue drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits
2020-03-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netLinus Torvalds6-8/+20
Pull networking fixes from David Miller: "It looks like a decent sized set of fixes, but a lot of these are one liner off-by-one and similar type changes: 1) Fix netlink header pointer to calcular bad attribute offset reported to user. From Pablo Neira Ayuso. 2) Don't double clear PHY interrupts when ->did_interrupt is set, from Heiner Kallweit. 3) Add missing validation of various (devlink, nl802154, fib, etc.) attributes, from Jakub Kicinski. 4) Missing *pos increments in various netfilter seq_next ops, from Vasily Averin. 5) Missing break in of_mdiobus_register() loop, from Dajun Jin. 6) Don't double bump tx_dropped in veth driver, from Jiang Lidong. 7) Work around FMAN erratum A050385, from Madalin Bucur. 8) Make sure ARP header is pulled early enough in bonding driver, from Eric Dumazet. 9) Do a cond_resched() during multicast processing of ipvlan and macvlan, from Mahesh Bandewar. 10) Don't attach cgroups to unrelated sockets when in interrupt context, from Shakeel Butt. 11) Fix tpacket ring state management when encountering unknown GSO types. From Willem de Bruijn. 12) Fix MDIO bus PHY resume by checking mdio_bus_phy_may_suspend() only in the suspend context. From Heiner Kallweit" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (112 commits) net: systemport: fix index check to avoid an array out of bounds access tc-testing: add ETS scheduler to tdc build configuration net: phy: fix MDIO bus PM PHY resuming net: hns3: clear port base VLAN when unload PF net: hns3: fix RMW issue for VLAN filter switch net: hns3: fix VF VLAN table entries inconsistent issue net: hns3: fix "tc qdisc del" failed issue taprio: Fix sending packets without dequeueing them net: mvmdio: avoid error message for optional IRQ net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register net: memcg: fix lockdep splat in inet_csk_accept() s390/qeth: implement smarter resizing of the RX buffer pool s390/qeth: refactor buffer pool code s390/qeth: use page pointers to manage RX buffer pool seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed net/packet: tpacket_rcv: do not increment ring index on drop sxgbe: Fix off by one in samsung driver strncpy size arg net: caif: Add lockdep expression to RCU traversal primitive MAINTAINERS: remove Sathya Perla as Emulex NIC maintainer ...
2020-03-12drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checksLyude Paul1-2/+2
DisplayPort specifications are fun. For a while, it's been really unclear to us what available_pbn actually does. There's a somewhat vague explanation in the DisplayPort spec (starting from 1.2) that partially explains it: The minimum payload bandwidth number supported by the path. Each node updates this number with its available payload bandwidth number if its payload bandwidth number is less than that in the Message Transaction reply. So, it sounds like available_pbn represents the smallest link rate in use between the source and the branch device. Cool, so full_pbn is just the highest possible PBN that the branch device supports right? Well, we assumed that for quite a while until Sean Paul noticed that on some MST hubs, available_pbn will actually get set to 0 whenever there's any active payloads on the respective branch device. This caused quite a bit of confusion since clearing the payload ID table would end up fixing the available_pbn value. So, we just went with that until commit cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") started breaking people's setups due to us getting erroneous available_pbn values. So, we did some more digging and got confused until we finally looked at the definition for full_pbn: The bandwidth of the link at the trained link rate and lane count between the DP Source device and the DP Sink device with no time slots allocated to VC Payloads, represented as a Payload Bandwidth Number. As with the Available_Payload_Bandwidth_Number, this number is determined by the link with the lowest lane count and link rate. That's what we get for not reading specs closely enough, hehe. So, since full_pbn is definitely what we want for doing bandwidth restriction checks - let's start using that instead and ignore available_pbn entirely. Signed-off-by: Lyude Paul <lyude@redhat.com> Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Cc: Mikita Lipski <mikita.lipski@amd.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Sean Paul <sean@poorly.run> Reviewed-by: Mikita Lipski <mikita.lipski@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-3-lyude@redhat.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
2020-03-12net: phy: fix MDIO bus PM PHY resumingHeiner Kallweit1-0/+2
So far we have the unfortunate situation that mdio_bus_phy_may_suspend() is called in suspend AND resume path, assuming that function result is the same. After the original change this is no longer the case, resulting in broken resume as reported by Geert. To fix this call mdio_bus_phy_may_suspend() in the suspend path only, and let the phy_device store the info whether it was suspended by MDIO bus PM. Fixes: 503ba7c69610 ("net: phy: Avoid multiple suspends") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-12Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds1-2/+4
Pull crypto fix from Herbert Xu: "Fix a build problem with x86/curve25519" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/curve25519 - support assemblers with no adx support
2020-03-12block: Fix partition support for host aware zoned block devicesShin'ichiro Kawasaki1-12/+1
Commit b72053072c0b ("block: allow partitions on host aware zone devices") introduced the helper function disk_has_partitions() to check if a given disk has valid partitions. However, since this function result directly depends on the disk partition table length rather than the actual existence of valid partitions in the table, it returns true even after all partitions are removed from the disk. For host aware zoned block devices, this results in zone management support to be kept disabled even after removing all partitions. Fix this by changing disk_has_partitions() to walk through the partition table entries and return true if and only if a valid non-zero size partition is found. Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") Cc: stable@vger.kernel.org # 5.5 Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-12ASoC: export DPCM runtime update functionsGuennadi Liakhovetski1-2/+2
This makes DPCM runtime update functions available for external calling. As an example, virtualised ASoC component drivers may need to call these when managing shared DAPM routes that are used by more than one driver (i.e. when host driver and guest drivers have a DAPM path from guest PCM to host DAI where some parts are owned by host driver and others by guest driver). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200312095214.15126-3-guennadi.liakhovetski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-11seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol numberPaolo Lungaroni1-0/+2
The Internet Assigned Numbers Authority (IANA) has recently assigned a protocol number value of 143 for Ethernet [1]. Before this assignment, encapsulation mechanisms such as Segment Routing used the IPv6-NoNxt protocol number (59) to indicate that the encapsulated payload is an Ethernet frame. In this patch, we add the definition of the Ethernet protocol number to the kernel headers and update the SRv6 L2 tunnels to use it. [1] https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Signed-off-by: Paolo Lungaroni <paolo.lungaroni@cnit.it> Reviewed-by: Andrea Mayer <andrea.mayer@uniroma2.it> Acked-by: Ahmed Abdelsalam <ahmed.abdelsalam@gssi.it> Signed-off-by: David S. Miller <davem@davemloft.net>