From: Sasha Levin Date: Mon, 1 May 2023 11:25:58 +0000 (-0400) Subject: Fixes for 6.1 X-Git-Tag: v5.15.111~152 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=210f941fec0aac66edbfd7be2d7941922bc8b247;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.1 Signed-off-by: Sasha Levin --- diff --git a/queue-6.1/asm-generic-io.h-suppress-endianness-warnings-for-re.patch b/queue-6.1/asm-generic-io.h-suppress-endianness-warnings-for-re.patch new file mode 100644 index 00000000000..847aa4c5631 --- /dev/null +++ b/queue-6.1/asm-generic-io.h-suppress-endianness-warnings-for-re.patch @@ -0,0 +1,51 @@ +From 16dbc20e5a5abb916dc0794c90d8ee498ea2c835 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 9 Jan 2023 15:11:52 +0200 +Subject: asm-generic/io.h: suppress endianness warnings for readq() and + writeq() + +From: Vladimir Oltean + +[ Upstream commit d564fa1ff19e893e2971d66e5c8f49dc1cdc8ffc ] + +Commit c1d55d50139b ("asm-generic/io.h: Fix sparse warnings on +big-endian architectures") missed fixing the 64-bit accessors. + +Arnd explains in the attached link why the casts are necessary, even if +__raw_readq() and __raw_writeq() do not take endian-specific types. + +Link: https://lore.kernel.org/lkml/9105d6fc-880b-4734-857d-e3d30b87ccf6@app.fastmail.com/ +Suggested-by: Arnd Bergmann +Signed-off-by: Vladimir Oltean +Reviewed-by: Jonathan Cameron +Signed-off-by: Arnd Bergmann +Signed-off-by: Sasha Levin +--- + include/asm-generic/io.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h +index a68f8fbf423be..cde032f86856e 100644 +--- a/include/asm-generic/io.h ++++ b/include/asm-generic/io.h +@@ -236,7 +236,7 @@ static inline u64 readq(const volatile void __iomem *addr) + + log_read_mmio(64, addr, _THIS_IP_); + __io_br(); +- val = __le64_to_cpu(__raw_readq(addr)); ++ val = __le64_to_cpu((__le64 __force)__raw_readq(addr)); + __io_ar(val); + log_post_read_mmio(val, 64, addr, _THIS_IP_); + return val; +@@ -287,7 +287,7 @@ static inline void writeq(u64 value, volatile void __iomem *addr) + { + log_write_mmio(value, 64, addr, _THIS_IP_); + __io_bw(); +- __raw_writeq(__cpu_to_le64(value), addr); ++ __raw_writeq((u64 __force)__cpu_to_le64(value), addr); + __io_aw(); + log_post_write_mmio(value, 64, addr, _THIS_IP_); + } +-- +2.39.2 + diff --git a/queue-6.1/asoc-amd-yc-add-dmi-entries-to-support-victus-by-hp-.patch b/queue-6.1/asoc-amd-yc-add-dmi-entries-to-support-victus-by-hp-.patch new file mode 100644 index 00000000000..27b4ac3734f --- /dev/null +++ b/queue-6.1/asoc-amd-yc-add-dmi-entries-to-support-victus-by-hp-.patch @@ -0,0 +1,44 @@ +From 138318d698ca70081d35d979b1d625d0f6c8faa8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 17 Mar 2023 00:38:51 +0200 +Subject: ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop + 16-e1xxx (8A22) + +From: Ge-org Brohammer + +[ Upstream commit 205efd4619b860404ebb5882e5a119eb3b3b3716 ] + +This model requires an additional detection quirk to +enable the internal microphone. + +Tried to use git send-email this time. + +Signed-off-by: Ge-org Brohammer +Link: https://lore.kernel.org/r/PAVP195MB2261322C220E95D7F4B2732ADABC9@PAVP195MB2261.EURP195.PROD.OUTLOOK.COM +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c +index 4a69ce702360c..0acdf0156f075 100644 +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -269,6 +269,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { + DMI_MATCH(DMI_BOARD_NAME, "8A43"), + } + }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "HP"), ++ DMI_MATCH(DMI_BOARD_NAME, "8A22"), ++ } ++ }, + {} + }; + +-- +2.39.2 + diff --git a/queue-6.1/asoc-da7213.c-add-missing-pm_runtime_disable.patch b/queue-6.1/asoc-da7213.c-add-missing-pm_runtime_disable.patch new file mode 100644 index 00000000000..eff37e9d46f --- /dev/null +++ b/queue-6.1/asoc-da7213.c-add-missing-pm_runtime_disable.patch @@ -0,0 +1,55 @@ +From 115a452d2d15715fd02f6c56de06fa5440029850 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 28 Mar 2023 00:03:03 +0000 +Subject: ASoC: da7213.c: add missing pm_runtime_disable() + +From: Duy Nguyen + +[ Upstream commit 44378cd113e5f15bb0a89f5ac5a0e687b52feb90 ] + +da7213.c is missing pm_runtime_disable(), thus we will get +below error when rmmod -> insmod. + + $ rmmod snd-soc-da7213.ko + $ insmod snd-soc-da7213.ko + da7213 0-001a: Unbalanced pm_runtime_enable!" + +[Kuninori adjusted to latest upstream] + +Signed-off-by: Duy Nguyen +Signed-off-by: Kuninori Morimoto +Tested-by: Khanh Le +Link: https://lore.kernel.org/r/87mt3xg2tk.wl-kuninori.morimoto.gx@renesas.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/da7213.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c +index 544ccbcfc8844..5678683c71bee 100644 +--- a/sound/soc/codecs/da7213.c ++++ b/sound/soc/codecs/da7213.c +@@ -1996,6 +1996,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c) + return ret; + } + ++static void da7213_i2c_remove(struct i2c_client *i2c) ++{ ++ pm_runtime_disable(&i2c->dev); ++} ++ + static int __maybe_unused da7213_runtime_suspend(struct device *dev) + { + struct da7213_priv *da7213 = dev_get_drvdata(dev); +@@ -2039,6 +2044,7 @@ static struct i2c_driver da7213_i2c_driver = { + .pm = &da7213_pm, + }, + .probe_new = da7213_i2c_probe, ++ .remove = da7213_i2c_remove, + .id_table = da7213_i2c_id, + }; + +-- +2.39.2 + diff --git a/queue-6.1/asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch b/queue-6.1/asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch new file mode 100644 index 00000000000..2a236ee1bae --- /dev/null +++ b/queue-6.1/asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch @@ -0,0 +1,50 @@ +From cb5303a065ed95550f865bc170795c3cb4f996bd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 22 Mar 2023 15:53:32 +0100 +Subject: ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 + +From: Hans de Goede + +[ Upstream commit e38c5e80c3d293a883c6f1d553f2146ec0bda35e ] + +The Acer Iconia One 7 B1-750 tablet mostly works fine with the defaults +for an Bay Trail CR tablet. Except for the internal mic, instead of +an analog mic on IN3 a digital mic on DMIC1 is uses. + +Add a quirk with these settings for this tablet. + +Acked-by: Pierre-Louis Bossart +Signed-off-by: Hans de Goede +Link: https://lore.kernel.org/r/20230322145332.131525-1-hdegoede@redhat.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c +index 4f46f52c38e44..783c201259921 100644 +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -533,6 +533,18 @@ static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream, + + /* Please keep this list alphabetically sorted */ + static const struct dmi_system_id byt_rt5640_quirk_table[] = { ++ { /* Acer Iconia One 7 B1-750 */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"), ++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "VESPA2"), ++ }, ++ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP | ++ BYT_RT5640_JD_SRC_JD1_IN4P | ++ BYT_RT5640_OVCD_TH_1500UA | ++ BYT_RT5640_OVCD_SF_0P75 | ++ BYT_RT5640_SSP0_AIF1 | ++ BYT_RT5640_MCLK_EN), ++ }, + { /* Acer Iconia Tab 8 W1-810 */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"), +-- +2.39.2 + diff --git a/queue-6.1/asoc-intel-soc-acpi-add-table-for-intel-rooks-county.patch b/queue-6.1/asoc-intel-soc-acpi-add-table-for-intel-rooks-county.patch new file mode 100644 index 00000000000..dec343134a7 --- /dev/null +++ b/queue-6.1/asoc-intel-soc-acpi-add-table-for-intel-rooks-county.patch @@ -0,0 +1,68 @@ +From 548c7284f938fa1853045114005ece09b05fa72f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 14 Mar 2023 17:05:53 +0800 +Subject: ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Eugene Huang + +[ Upstream commit 9c691a42b8926c8966561265cdae3ddc7464d3a2 ] + +Same topology as the HP Omen 16-k0005TX, except with the rt1316 amp +on link2. + +Link: https://github.com/thesofproject/linux/issues/4088 +Signed-off-by: Eugene Huang +Reviewed-by: Pierre-Louis Bossart +Reviewed-by: Péter Ujfalusi +Signed-off-by: Bard Liao +Link: https://lore.kernel.org/r/20230314090553.498664-3-yung-chuan.liao@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + .../intel/common/soc-acpi-intel-adl-match.c | 20 +++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c +index 0102574025e90..6e21e1640acfa 100644 +--- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c +@@ -354,6 +354,20 @@ static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link3[] = { + {} + }; + ++static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link2[] = { ++ { ++ .mask = BIT(0), ++ .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), ++ .adr_d = rt711_sdca_0_adr, ++ }, ++ { ++ .mask = BIT(2), ++ .num_adr = ARRAY_SIZE(rt1316_2_single_adr), ++ .adr_d = rt1316_2_single_adr, ++ }, ++ {} ++}; ++ + static const struct snd_soc_acpi_adr_device mx8373_2_adr[] = { + { + .adr = 0x000223019F837300ull, +@@ -612,6 +626,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg", + }, ++ { ++ .link_mask = 0x5, /* 2 active links required */ ++ .links = adl_sdw_rt711_link0_rt1316_link2, ++ .drv_name = "sof_sdw", ++ .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg", ++ }, + { + .link_mask = 0x1, /* link0 required */ + .links = adl_rvp, +-- +2.39.2 + diff --git a/queue-6.1/asoc-intel-sof_sdw-add-quirk-for-intel-rooks-county-.patch b/queue-6.1/asoc-intel-sof_sdw-add-quirk-for-intel-rooks-county-.patch new file mode 100644 index 00000000000..c6cfe50e3b0 --- /dev/null +++ b/queue-6.1/asoc-intel-sof_sdw-add-quirk-for-intel-rooks-county-.patch @@ -0,0 +1,52 @@ +From 22b9b7dd0f8d7fc596e851f1baabb048a1f021fe Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 14 Mar 2023 17:05:52 +0800 +Subject: ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Eugene Huang + +[ Upstream commit 3c728b1bc5b99c5275ac5c7788ef814c0e51ef54 ] + +Same quirks as the 'Bishop County' NUC M15, except the rt711 is in the +'JD2 100K' jack detection mode. + +Link: https://github.com/thesofproject/linux/issues/4088 +Signed-off-by: Eugene Huang +Reviewed-by: Pierre-Louis Bossart +Reviewed-by: Péter Ujfalusi +Signed-off-by: Bard Liao +Link: https://lore.kernel.org/r/20230314090553.498664-2-yung-chuan.liao@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/sof_sdw.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c +index ee9857dc3135d..d4f92bb5e29f8 100644 +--- a/sound/soc/intel/boards/sof_sdw.c ++++ b/sound/soc/intel/boards/sof_sdw.c +@@ -213,6 +213,17 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { + SOF_SDW_PCH_DMIC | + RT711_JD1), + }, ++ { ++ /* NUC15 'Rooks County' LAPRC510 and LAPRC710 skews */ ++ .callback = sof_sdw_quirk_cb, ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Intel(R) Client Systems"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"), ++ }, ++ .driver_data = (void *)(SOF_SDW_TGL_HDMI | ++ SOF_SDW_PCH_DMIC | ++ RT711_JD2_100K), ++ }, + /* TigerLake-SDCA devices */ + { + .callback = sof_sdw_quirk_cb, +-- +2.39.2 + diff --git a/queue-6.1/asoc-soc-pcm-fix-hw-formats-cleared-by-soc_pcm_hw_in.patch b/queue-6.1/asoc-soc-pcm-fix-hw-formats-cleared-by-soc_pcm_hw_in.patch new file mode 100644 index 00000000000..4e0f4fae347 --- /dev/null +++ b/queue-6.1/asoc-soc-pcm-fix-hw-formats-cleared-by-soc_pcm_hw_in.patch @@ -0,0 +1,47 @@ +From c8c5c262a74617eb3f422f5cf33436390d44da46 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 9 Mar 2023 15:13:37 +0800 +Subject: ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm + +From: Shengjiu Wang + +[ Upstream commit 083a25b18d6ad9f1f540e629909aa3eaaaf01823 ] + +The hw->formats may be set by snd_dmaengine_pcm_refine_runtime_hwparams() +in component's startup()/open(), but soc_pcm_hw_init() will init +hw->formats in dpcm_runtime_setup_fe() after component's startup()/open(), +which causes the valuable hw->formats to be cleared. + +So need to store the hw->formats before initialization, then restore +it after initialization. + +Signed-off-by: Shengjiu Wang +Link: https://lore.kernel.org/r/1678346017-3660-1-git-send-email-shengjiu.wang@nxp.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/soc-pcm.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c +index 35a16c3f9591b..7a486ca9633c1 100644 +--- a/sound/soc/soc-pcm.c ++++ b/sound/soc/soc-pcm.c +@@ -1649,10 +1649,14 @@ static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream) + struct snd_pcm_hardware *hw = &runtime->hw; + struct snd_soc_dai *dai; + int stream = substream->stream; ++ u64 formats = hw->formats; + int i; + + soc_pcm_hw_init(hw); + ++ if (formats) ++ hw->formats &= formats; ++ + for_each_rtd_cpu_dais(fe, i, dai) { + struct snd_soc_pcm_stream *cpu_stream; + +-- +2.39.2 + diff --git a/queue-6.1/iio-adc-palmas_gpadc-fix-null-dereference-on-rmmod.patch b/queue-6.1/iio-adc-palmas_gpadc-fix-null-dereference-on-rmmod.patch new file mode 100644 index 00000000000..f1fda03f8ea --- /dev/null +++ b/queue-6.1/iio-adc-palmas_gpadc-fix-null-dereference-on-rmmod.patch @@ -0,0 +1,39 @@ +From c51037b760bfefb7c564f80e651ade3a12e2ab63 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 13 Mar 2023 21:50:29 +0100 +Subject: iio: adc: palmas_gpadc: fix NULL dereference on rmmod +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Patrik Dahlström + +[ Upstream commit 49f76c499d38bf67803438eee88c8300d0f6ce09 ] + +Calling dev_to_iio_dev() on a platform device pointer is undefined and +will make adc NULL. + +Signed-off-by: Patrik Dahlström +Link: https://lore.kernel.org/r/20230313205029.1881745-1-risca@dalakolonin.se +Signed-off-by: Jonathan Cameron +Signed-off-by: Sasha Levin +--- + drivers/iio/adc/palmas_gpadc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c +index fd000345ec5cf..849a697a467e5 100644 +--- a/drivers/iio/adc/palmas_gpadc.c ++++ b/drivers/iio/adc/palmas_gpadc.c +@@ -639,7 +639,7 @@ static int palmas_gpadc_probe(struct platform_device *pdev) + + static int palmas_gpadc_remove(struct platform_device *pdev) + { +- struct iio_dev *indio_dev = dev_to_iio_dev(&pdev->dev); ++ struct iio_dev *indio_dev = dev_get_drvdata(&pdev->dev); + struct palmas_gpadc *adc = iio_priv(indio_dev); + + if (adc->wakeup1_enable || adc->wakeup2_enable) +-- +2.39.2 + diff --git a/queue-6.1/net-sfp-add-quirk-enabling-2500base-x-for-hg-mxpd-48.patch b/queue-6.1/net-sfp-add-quirk-enabling-2500base-x-for-hg-mxpd-48.patch new file mode 100644 index 00000000000..01d51b77151 --- /dev/null +++ b/queue-6.1/net-sfp-add-quirk-enabling-2500base-x-for-hg-mxpd-48.patch @@ -0,0 +1,47 @@ +From 24db9cd268fec59994c2195d4f77d56b65038df4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 2 Apr 2023 12:44:37 +0100 +Subject: net: sfp: add quirk enabling 2500Base-x for HG MXPD-483II + +From: Daniel Golle + +[ Upstream commit ad651d68cee75e9ac20002254c4e5d09ee67a84b ] + +The HG MXPD-483II 1310nm SFP module is meant to operate with 2500Base-X, +however, in their EEPROM they incorrectly specify: + Transceiver type : Ethernet: 1000BASE-LX + ... + BR, Nominal : 2600MBd + +Use sfp_quirk_2500basex for this module to allow 2500Base-X mode anyway. + +https://forum.banana-pi.org/t/bpi-r3-sfp-module-compatibility/14573/60 + +Reported-by: chowtom +Tested-by: chowtom +Signed-off-by: Daniel Golle +Reviewed-by: Russell King (Oracle) +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/phy/sfp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c +index 5663a184644d5..766f86bdc4a09 100644 +--- a/drivers/net/phy/sfp.c ++++ b/drivers/net/phy/sfp.c +@@ -395,6 +395,10 @@ static const struct sfp_quirk sfp_quirks[] = { + + SFP_QUIRK_F("HALNy", "HL-GSFP", sfp_fixup_halny_gsfp), + ++ // HG MXPD-483II-F 2.5G supports 2500Base-X, but incorrectly reports ++ // 2600MBd in their EERPOM ++ SFP_QUIRK_M("HG GENUINE", "MXPD-483II", sfp_quirk_2500basex), ++ + // Huawei MA5671A can operate at 2500base-X, but report 1.2GBd NRZ in + // their EEPROM + SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex, +-- +2.39.2 + diff --git a/queue-6.1/net-wwan-t7xx-do-not-compile-with-werror.patch b/queue-6.1/net-wwan-t7xx-do-not-compile-with-werror.patch new file mode 100644 index 00000000000..ffbb3701ca5 --- /dev/null +++ b/queue-6.1/net-wwan-t7xx-do-not-compile-with-werror.patch @@ -0,0 +1,61 @@ +From 2daaf57cbc314915e7f9a2b06e0a06d318263d93 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 31 Mar 2023 08:35:15 +0200 +Subject: net: wwan: t7xx: do not compile with -Werror + +From: Jiri Slaby (SUSE) + +[ Upstream commit 362f0b6678ad1377c322a7dd237ea6785efc7342 ] + +When playing with various compilers or their versions, some choke on +the t7xx code. For example (with gcc 13): + In file included from ./arch/s390/include/generated/asm/rwonce.h:1, + from ../include/linux/compiler.h:247, + from ../include/linux/build_bug.h:5, + from ../include/linux/bits.h:22, + from ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:17: + In function 'preempt_count', + inlined from 't7xx_fsm_append_event' at ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:439:43: + ../include/asm-generic/rwonce.h:44:26: error: array subscript 0 is outside array bounds of 'const volatile int[0]' [-Werror=array-bounds=] + +There is no reason for any code in the kernel to be built with -Werror +by default. Note that we have generic CONFIG_WERROR. So if anyone wants +-Werror, they can enable that. + +Signed-off-by: Jiri Slaby (SUSE) +Link: https://lore.kernel.org/all/20230330232717.1f8bf5ea@kernel.org/ +Cc: Chandrashekar Devegowda +Cc: Intel Corporation +Cc: Chiranjeevi Rapolu +Cc: Liu Haijun +Cc: M Chetan Kumar +Cc: Ricardo Martinez +Cc: Loic Poulain +Cc: Sergey Ryazanov +Cc: Johannes Berg +Cc: "David S. Miller" +Cc: Eric Dumazet +Cc: Jakub Kicinski +Cc: Paolo Abeni +Cc: netdev@vger.kernel.org +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wwan/t7xx/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/net/wwan/t7xx/Makefile b/drivers/net/wwan/t7xx/Makefile +index dc6a7d682c159..5e6398b527e72 100644 +--- a/drivers/net/wwan/t7xx/Makefile ++++ b/drivers/net/wwan/t7xx/Makefile +@@ -1,7 +1,5 @@ + # SPDX-License-Identifier: GPL-2.0-only + +-ccflags-y += -Werror +- + obj-${CONFIG_MTK_T7XX} := mtk_t7xx.o + mtk_t7xx-y:= t7xx_pci.o \ + t7xx_pcie_mac.o \ +-- +2.39.2 + diff --git a/queue-6.1/platform-x86-thinkpad_acpi-add-missing-t14s-gen1-typ.patch b/queue-6.1/platform-x86-thinkpad_acpi-add-missing-t14s-gen1-typ.patch new file mode 100644 index 00000000000..9e61ff92001 --- /dev/null +++ b/queue-6.1/platform-x86-thinkpad_acpi-add-missing-t14s-gen1-typ.patch @@ -0,0 +1,57 @@ +From dd927660a274e636ccb2d29dca706b58262f4b28 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 1 Apr 2023 01:24:47 +0200 +Subject: platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle + quirk list + +From: Benjamin Asbach + +[ Upstream commit 9a469c6dfab38326f99f105386db84230be09ee3 ] + +From the commit message adding the first s2idle quirks: + +> Lenovo laptops that contain NVME SSDs across a variety of generations have +> trouble resuming from suspend to idle when the IOMMU translation layer is +> active for the NVME storage device. +> +> This generally manifests as a large resume delay or page faults. These +> delays and page faults occur as a result of a Lenovo BIOS specific SMI +> that runs during the D3->D0 transition on NVME devices. + +Add the DMI ids for another variant of the T14s Gen1, which also needs +the s2idle quirk. + +Link: https://lore.kernel.org/all/20220503183420.348-1-mario.limonciello@amd.com/ +Link: https://bbs.archlinux.org/viewtopic.php?pid=2084655#p2084655 +Signed-off-by: Benjamin Asbach +Tested-by: Benjamin Asbach +Link: https://lore.kernel.org/r/20230331232447.37204-1-asbachb.kernel@impl.it +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/thinkpad_acpi.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c +index 2a48a2d880d86..d1ec31086e9ba 100644 +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -4481,6 +4481,14 @@ static const struct dmi_system_id fwbug_list[] __initconst = { + DMI_MATCH(DMI_PRODUCT_NAME, "20UH"), + } + }, ++ { ++ .ident = "T14s Gen1 AMD", ++ .driver_data = &quirk_s2idle_bug, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"), ++ } ++ }, + { + .ident = "P14s Gen1 AMD", + .driver_data = &quirk_s2idle_bug, +-- +2.39.2 + diff --git a/queue-6.1/scsi-mpi3mr-handle-soft-reset-in-progress-fault-code.patch b/queue-6.1/scsi-mpi3mr-handle-soft-reset-in-progress-fault-code.patch new file mode 100644 index 00000000000..5c076037f23 --- /dev/null +++ b/queue-6.1/scsi-mpi3mr-handle-soft-reset-in-progress-fault-code.patch @@ -0,0 +1,42 @@ +From 617f2c09e1e6e6757bee844ad52f11de539f12d5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 31 Mar 2023 17:53:17 +0530 +Subject: scsi: mpi3mr: Handle soft reset in progress fault code (0xF002) + +From: Ranjan Kumar + +[ Upstream commit a3d27dfdcfc27ac3f46de5391bb6d24f04af7941 ] + +The driver is exiting from the fault watchdog thread if it sees the 0xF002 +(Soft reset in progress) fault code. + +If the driver initiates the soft reset, then the driver restarts the +watchdog at the end of the soft reset completion. However, if the soft +reset is initiated by the firmware asynchronously, then the driver will +never restart the watchdog and never re-initialize the controller after the +asynchronous soft reset completion. + +Signed-off-by: Ranjan Kumar +Link: https://lore.kernel.org/r/20230331122317.11391-1-ranjan.kumar@broadcom.com +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c +index ea9e69fb62826..64355d0baa5fb 100644 +--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c ++++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c +@@ -2526,7 +2526,7 @@ static void mpi3mr_watchdog_work(struct work_struct *work) + mrioc->unrecoverable = 1; + goto schedule_work; + case MPI3_SYSIF_FAULT_CODE_SOFT_RESET_IN_PROGRESS: +- return; ++ goto schedule_work; + case MPI3_SYSIF_FAULT_CODE_CI_ACTIVATION_RESET: + reset_reason = MPI3MR_RESET_FROM_CIACTIV_FAULT; + break; +-- +2.39.2 + diff --git a/queue-6.1/selftests-mount-fix-mount_setattr_test-builds-failed.patch b/queue-6.1/selftests-mount-fix-mount_setattr_test-builds-failed.patch new file mode 100644 index 00000000000..b3b9fa36ed1 --- /dev/null +++ b/queue-6.1/selftests-mount-fix-mount_setattr_test-builds-failed.patch @@ -0,0 +1,43 @@ +From 5bea4021740ba1a0ec38c71240ff9637f0f527b3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Mar 2023 09:14:15 +0700 +Subject: selftests mount: Fix mount_setattr_test builds failed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Anh Tuan Phan + +[ Upstream commit f1594bc676579133a3cd906d7d27733289edfb86 ] + +When compiling selftests with target mount_setattr I encountered some errors with the below messages: +mount_setattr_test.c: In function ‘mount_setattr_thread’: +mount_setattr_test.c:343:16: error: variable ‘attr’ has initializer but incomplete type + 343 | struct mount_attr attr = { + | ^~~~~~~~~~ + +These errors might be because of linux/mount.h is not included. This patch resolves that issue. + +Signed-off-by: Anh Tuan Phan +Acked-by: Christian Brauner +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/mount_setattr/mount_setattr_test.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c +index 8c5fea68ae677..969647228817b 100644 +--- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c ++++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "../kselftest_harness.h" + +-- +2.39.2 + diff --git a/queue-6.1/series b/queue-6.1/series new file mode 100644 index 00000000000..f44848c8cce --- /dev/null +++ b/queue-6.1/series @@ -0,0 +1,17 @@ +asoc-intel-sof_sdw-add-quirk-for-intel-rooks-county-.patch +asoc-intel-soc-acpi-add-table-for-intel-rooks-county.patch +asoc-soc-pcm-fix-hw-formats-cleared-by-soc_pcm_hw_in.patch +x86-hyperv-block-root-partition-functionality-in-a-c.patch +asoc-amd-yc-add-dmi-entries-to-support-victus-by-hp-.patch +iio-adc-palmas_gpadc-fix-null-dereference-on-rmmod.patch +asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch +asoc-da7213.c-add-missing-pm_runtime_disable.patch +net-wwan-t7xx-do-not-compile-with-werror.patch +selftests-mount-fix-mount_setattr_test-builds-failed.patch +scsi-mpi3mr-handle-soft-reset-in-progress-fault-code.patch +net-sfp-add-quirk-enabling-2500base-x-for-hg-mxpd-48.patch +platform-x86-thinkpad_acpi-add-missing-t14s-gen1-typ.patch +wifi-ath11k-reduce-the-mhi-timeout-to-20s.patch +tracing-error-if-a-trace-event-has-an-array-for-a-__.patch +asm-generic-io.h-suppress-endianness-warnings-for-re.patch +x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch diff --git a/queue-6.1/tracing-error-if-a-trace-event-has-an-array-for-a-__.patch b/queue-6.1/tracing-error-if-a-trace-event-has-an-array-for-a-__.patch new file mode 100644 index 00000000000..0ebc1892999 --- /dev/null +++ b/queue-6.1/tracing-error-if-a-trace-event-has-an-array-for-a-__.patch @@ -0,0 +1,83 @@ +From 0db7172e7d810534b30b5621bad5aeb0ed766dab Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 9 Mar 2023 22:13:02 -0500 +Subject: tracing: Error if a trace event has an array for a __field() + +From: Steven Rostedt (Google) + +[ Upstream commit f82e7ca019dfad3b006fd3b772f7ac569672db55 ] + +A __field() in the TRACE_EVENT() macro is used to set up the fields of the +trace event data. It is for single storage units (word, char, int, +pointer, etc) and not for complex structures or arrays. Unfortunately, +there's nothing preventing the build from accepting: + + __field(int, arr[5]); + +from building. It will turn into a array value. This use to work fine, as +the offset and size use to be determined by the macro using the field name, +but things have changed and the offset and size are now determined by the +type. So the above would only be size 4, and the next field will be +located 4 bytes from it (instead of 20). + +The proper way to declare static arrays is to use the __array() macro. + +Instead of __field(int, arr[5]) it should be __array(int, arr, 5). + +Add some macro tricks to the building of a trace event from the +TRACE_EVENT() macro such that __field(int, arr[5]) will fail to build. A +comment by the failure will explain why the build failed. + +Link: https://lore.kernel.org/lkml/20230306122549.236561-1-douglas.raillard@arm.com/ +Link: https://lore.kernel.org/linux-trace-kernel/20230309221302.642e82d9@gandalf.local.home + +Reported-by: Douglas RAILLARD +Signed-off-by: Steven Rostedt (Google) +Acked-by: Masami Hiramatsu (Google) +Signed-off-by: Sasha Levin +--- + include/trace/stages/stage5_get_offsets.h | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/include/trace/stages/stage5_get_offsets.h b/include/trace/stages/stage5_get_offsets.h +index fba4c24ed9e60..def36fbb8c5cd 100644 +--- a/include/trace/stages/stage5_get_offsets.h ++++ b/include/trace/stages/stage5_get_offsets.h +@@ -9,17 +9,30 @@ + #undef __entry + #define __entry entry + ++/* ++ * Fields should never declare an array: i.e. __field(int, arr[5]) ++ * If they do, it will cause issues in parsing and possibly corrupt the ++ * events. To prevent that from happening, test the sizeof() a fictitious ++ * type called "struct _test_no_array_##item" which will fail if "item" ++ * contains array elements (like "arr[5]"). ++ * ++ * If you hit this, use __array(int, arr, 5) instead. ++ */ + #undef __field +-#define __field(type, item) ++#define __field(type, item) \ ++ { (void)sizeof(struct _test_no_array_##item *); } + + #undef __field_ext +-#define __field_ext(type, item, filter_type) ++#define __field_ext(type, item, filter_type) \ ++ { (void)sizeof(struct _test_no_array_##item *); } + + #undef __field_struct +-#define __field_struct(type, item) ++#define __field_struct(type, item) \ ++ { (void)sizeof(struct _test_no_array_##item *); } + + #undef __field_struct_ext +-#define __field_struct_ext(type, item, filter_type) ++#define __field_struct_ext(type, item, filter_type) \ ++ { (void)sizeof(struct _test_no_array_##item *); } + + #undef __array + #define __array(type, item, len) +-- +2.39.2 + diff --git a/queue-6.1/wifi-ath11k-reduce-the-mhi-timeout-to-20s.patch b/queue-6.1/wifi-ath11k-reduce-the-mhi-timeout-to-20s.patch new file mode 100644 index 00000000000..a3f0c2c923d --- /dev/null +++ b/queue-6.1/wifi-ath11k-reduce-the-mhi-timeout-to-20s.patch @@ -0,0 +1,52 @@ +From f59a415a539e030636a5e2a8aecb4c0fe937d7ae Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 29 Mar 2023 19:20:38 +0300 +Subject: wifi: ath11k: reduce the MHI timeout to 20s + +From: Kalle Valo + +[ Upstream commit cf5fa3ca0552f1b7ba8490de40700bbfb6979b17 ] + +Currently ath11k breaks after hibernation, the reason being that ath11k expects +that the wireless device will have power during suspend and the firmware will +continue running. But of course during hibernation the power from the device is +cut off and firmware is not running when resuming, so ath11k will fail. + +(The reason why ath11k needs the firmware running is the interaction between +mac80211 and MHI stack, it's a long story and more info in the bugzilla report.) + +In SUSE kernels the watchdog timeout is reduced from the default 120 to 60 seconds: + +CONFIG_DPM_WATCHDOG_TIMEOUT=60 + +But as the ath11k MHI timeout is 90 seconds the kernel will crash before will +ath11k will recover in resume callback. To avoid the crash reduce the MHI +timeout to just 20 seconds. + +Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9 + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=214649 +Signed-off-by: Kalle Valo +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20230329162038.8637-1-kvalo@kernel.org +Signed-off-by: Sasha Levin +--- + drivers/net/wireless/ath/ath11k/mhi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c +index 86995e8dc9135..a62ee05c54097 100644 +--- a/drivers/net/wireless/ath/ath11k/mhi.c ++++ b/drivers/net/wireless/ath/ath11k/mhi.c +@@ -16,7 +16,7 @@ + #include "pci.h" + #include "pcic.h" + +-#define MHI_TIMEOUT_DEFAULT_MS 90000 ++#define MHI_TIMEOUT_DEFAULT_MS 20000 + #define RDDM_DUMP_SIZE 0x420000 + + static struct mhi_channel_config ath11k_mhi_channels_qca6390[] = { +-- +2.39.2 + diff --git a/queue-6.1/x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch b/queue-6.1/x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch new file mode 100644 index 00000000000..d45ad0fe885 --- /dev/null +++ b/queue-6.1/x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch @@ -0,0 +1,35 @@ +From 3057538c918c9390f30b41dbfcc0b877dd4a23de Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 4 Apr 2023 10:46:41 -0700 +Subject: x86/cpu: Add model number for Intel Arrow Lake processor + +From: Tony Luck + +[ Upstream commit 81515ecf155a38f3532bf5ddef88d651898df6be ] + +Successor to Lunar Lake. + +Signed-off-by: Tony Luck +Signed-off-by: Borislav Petkov (AMD) +Link: https://lore.kernel.org/r/20230404174641.426593-1-tony.luck@intel.com +Signed-off-by: Sasha Levin +--- + arch/x86/include/asm/intel-family.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h +index cbaf174d8efd9..b3af2d45bbbb5 100644 +--- a/arch/x86/include/asm/intel-family.h ++++ b/arch/x86/include/asm/intel-family.h +@@ -125,6 +125,8 @@ + + #define INTEL_FAM6_LUNARLAKE_M 0xBD + ++#define INTEL_FAM6_ARROWLAKE 0xC6 ++ + /* "Small Core" Processors (Atom/E-Core) */ + + #define INTEL_FAM6_ATOM_BONNELL 0x1C /* Diamondville, Pineview */ +-- +2.39.2 + diff --git a/queue-6.1/x86-hyperv-block-root-partition-functionality-in-a-c.patch b/queue-6.1/x86-hyperv-block-root-partition-functionality-in-a-c.patch new file mode 100644 index 00000000000..65477e1639d --- /dev/null +++ b/queue-6.1/x86-hyperv-block-root-partition-functionality-in-a-c.patch @@ -0,0 +1,52 @@ +From 2f31d6c7477a3f37b1c8d7ce966217cc3f8ac4a8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 15 Mar 2023 08:34:13 -0700 +Subject: x86/hyperv: Block root partition functionality in a Confidential VM + +From: Michael Kelley + +[ Upstream commit f8acb24aaf89fc46cd953229462ea8abe31b395f ] + +Hyper-V should never specify a VM that is a Confidential VM and also +running in the root partition. Nonetheless, explicitly block such a +combination to guard against a compromised Hyper-V maliciously trying to +exploit root partition functionality in a Confidential VM to expose +Confidential VM secrets. No known bug is being fixed, but the attack +surface for Confidential VMs on Hyper-V is reduced. + +Signed-off-by: Michael Kelley +Link: https://lore.kernel.org/r/1678894453-95392-1-git-send-email-mikelley@microsoft.com +Signed-off-by: Wei Liu +Signed-off-by: Sasha Levin +--- + arch/x86/kernel/cpu/mshyperv.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c +index 831613959a92a..34d9e899e471e 100644 +--- a/arch/x86/kernel/cpu/mshyperv.c ++++ b/arch/x86/kernel/cpu/mshyperv.c +@@ -291,12 +291,16 @@ static void __init ms_hyperv_init_platform(void) + * To mirror what Windows does we should extract CPU management + * features and use the ReservedIdentityBit to detect if Linux is the + * root partition. But that requires negotiating CPU management +- * interface (a process to be finalized). ++ * interface (a process to be finalized). For now, use the privilege ++ * flag as the indicator for running as root. + * +- * For now, use the privilege flag as the indicator for running as +- * root. ++ * Hyper-V should never specify running as root and as a Confidential ++ * VM. But to protect against a compromised/malicious Hyper-V trying ++ * to exploit root behavior to expose Confidential VM memory, ignore ++ * the root partition setting if also a Confidential VM. + */ +- if (cpuid_ebx(HYPERV_CPUID_FEATURES) & HV_CPU_MANAGEMENT) { ++ if ((ms_hyperv.priv_high & HV_CPU_MANAGEMENT) && ++ !(ms_hyperv.priv_high & HV_ISOLATION)) { + hv_root_partition = true; + pr_info("Hyper-V: running as root partition\n"); + } +-- +2.39.2 +