From: Greg Kroah-Hartman Date: Mon, 21 Apr 2025 11:35:18 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v6.1.135~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=182c5ab20f527e5abe202fc6d82f825a14a9cf80;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch asus-laptop-fix-an-uninitialized-variable.patch revert-pci-avoid-reset-when-disabled-via-sysfs.patch writeback-fix-false-warning-in-inode_to_wb.patch --- diff --git a/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch b/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch new file mode 100644 index 0000000000..8dc620f275 --- /dev/null +++ b/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch @@ -0,0 +1,167 @@ +From 7648beb65600220996ebb2da207610b1ff9b735e Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Thu, 3 Apr 2025 17:02:09 +0100 +Subject: ASoC: codecs:lpass-wsa-macro: Fix logic of enabling vi channels + +From: Srinivas Kandagatla + +commit 7648beb65600220996ebb2da207610b1ff9b735e upstream. + +Existing code only configures one of WSA_MACRO_TX0 or WSA_MACRO_TX1 +paths eventhough we enable both of them. Fix this bug by adding proper +checks and rearranging some of the common code to able to allow setting +both TX0 and TX1 paths + +Without this patch only one channel gets enabled in VI path instead of 2 +channels. End result would be 1 channel recording instead of 2. + +Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route") +Cc: stable@vger.kernel.org +Co-developed-by: Manikantan R +Signed-off-by: Manikantan R +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Dmitry Baryshkov +Link: https://patch.msgid.link/20250403160209.21613-3-srinivas.kandagatla@linaro.org +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/lpass-wsa-macro.c | 108 +++++++++++++++++++++---------------- + 1 file changed, 63 insertions(+), 45 deletions(-) + +--- a/sound/soc/codecs/lpass-wsa-macro.c ++++ b/sound/soc/codecs/lpass-wsa-macro.c +@@ -1153,6 +1153,67 @@ static void wsa_macro_mclk_enable(struct + } + } + ++static void wsa_macro_enable_disable_vi_sense(struct snd_soc_component *component, bool enable, ++ u32 tx_reg0, u32 tx_reg1, u32 val) ++{ ++ if (enable) { ++ /* Enable V&I sensing */ ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_RESET); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_RESET); ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, ++ val); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, ++ val); ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, ++ CDC_WSA_TX_SPKR_PROT_CLK_ENABLE); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, ++ CDC_WSA_TX_SPKR_PROT_CLK_ENABLE); ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_NO_RESET); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_NO_RESET); ++ } else { ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_RESET); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_RESET_MASK, ++ CDC_WSA_TX_SPKR_PROT_RESET); ++ snd_soc_component_update_bits(component, tx_reg0, ++ CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, ++ CDC_WSA_TX_SPKR_PROT_CLK_DISABLE); ++ snd_soc_component_update_bits(component, tx_reg1, ++ CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, ++ CDC_WSA_TX_SPKR_PROT_CLK_DISABLE); ++ } ++} ++ ++static void wsa_macro_enable_disable_vi_feedback(struct snd_soc_component *component, ++ bool enable, u32 rate) ++{ ++ struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); ++ ++ if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) ++ wsa_macro_enable_disable_vi_sense(component, enable, ++ CDC_WSA_TX0_SPKR_PROT_PATH_CTL, ++ CDC_WSA_TX1_SPKR_PROT_PATH_CTL, rate); ++ ++ if (test_bit(WSA_MACRO_TX1, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) ++ wsa_macro_enable_disable_vi_sense(component, enable, ++ CDC_WSA_TX2_SPKR_PROT_PATH_CTL, ++ CDC_WSA_TX3_SPKR_PROT_PATH_CTL, rate); ++} ++ + static int wsa_macro_mclk_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) + { +@@ -1169,7 +1230,6 @@ static int wsa_macro_enable_vi_feedback( + { + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); +- u32 tx_reg0, tx_reg1; + u32 rate_val; + + switch (wsa->pcm_rate_vi) { +@@ -1193,56 +1253,14 @@ static int wsa_macro_enable_vi_feedback( + break; + } + +- if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) { +- tx_reg0 = CDC_WSA_TX0_SPKR_PROT_PATH_CTL; +- tx_reg1 = CDC_WSA_TX1_SPKR_PROT_PATH_CTL; +- } else if (test_bit(WSA_MACRO_TX1, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) { +- tx_reg0 = CDC_WSA_TX2_SPKR_PROT_PATH_CTL; +- tx_reg1 = CDC_WSA_TX3_SPKR_PROT_PATH_CTL; +- } +- + switch (event) { + case SND_SOC_DAPM_POST_PMU: + /* Enable V&I sensing */ +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_RESET); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_RESET); +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, +- rate_val); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, +- rate_val); +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, +- CDC_WSA_TX_SPKR_PROT_CLK_ENABLE); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, +- CDC_WSA_TX_SPKR_PROT_CLK_ENABLE); +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_NO_RESET); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_NO_RESET); ++ wsa_macro_enable_disable_vi_feedback(component, true, rate_val); + break; + case SND_SOC_DAPM_POST_PMD: + /* Disable V&I sensing */ +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_RESET); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_RESET_MASK, +- CDC_WSA_TX_SPKR_PROT_RESET); +- snd_soc_component_update_bits(component, tx_reg0, +- CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, +- CDC_WSA_TX_SPKR_PROT_CLK_DISABLE); +- snd_soc_component_update_bits(component, tx_reg1, +- CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, +- CDC_WSA_TX_SPKR_PROT_CLK_DISABLE); ++ wsa_macro_enable_disable_vi_feedback(component, false, rate_val); + break; + } + diff --git a/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch b/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch new file mode 100644 index 0000000000..015e2f41c2 --- /dev/null +++ b/queue-6.6/asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch @@ -0,0 +1,118 @@ +From d7bff1415e85b889dc8908be6aedba8807ae5e37 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Thu, 3 Apr 2025 17:02:08 +0100 +Subject: ASoC: codecs:lpass-wsa-macro: Fix vi feedback rate + +From: Srinivas Kandagatla + +commit d7bff1415e85b889dc8908be6aedba8807ae5e37 upstream. + +Currently the VI feedback rate is set to fixed 8K, fix this by getting +the correct rate from params_rate. + +Without this patch incorrect rate will be set on the VI feedback +recording resulting in rate miss match and audio artifacts. + +Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route") +Cc: stable@vger.kernel.org +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Dmitry Baryshkov +Link: https://patch.msgid.link/20250403160209.21613-2-srinivas.kandagatla@linaro.org +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/lpass-wsa-macro.c | 39 ++++++++++++++++++++++++++++++++++--- + 1 file changed, 36 insertions(+), 3 deletions(-) + +--- a/sound/soc/codecs/lpass-wsa-macro.c ++++ b/sound/soc/codecs/lpass-wsa-macro.c +@@ -66,6 +66,10 @@ + #define CDC_WSA_TX_SPKR_PROT_CLK_DISABLE 0 + #define CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK GENMASK(3, 0) + #define CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K 0 ++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_16K 1 ++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_24K 2 ++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_32K 3 ++#define CDC_WSA_TX_SPKR_PROT_PCM_RATE_48K 4 + #define CDC_WSA_TX0_SPKR_PROT_PATH_CFG0 (0x0248) + #define CDC_WSA_TX1_SPKR_PROT_PATH_CTL (0x0264) + #define CDC_WSA_TX1_SPKR_PROT_PATH_CFG0 (0x0268) +@@ -347,6 +351,7 @@ struct wsa_macro { + int ear_spkr_gain; + int spkr_gain_offset; + int spkr_mode; ++ u32 pcm_rate_vi; + int is_softclip_on[WSA_MACRO_SOFTCLIP_MAX]; + int softclip_clk_users[WSA_MACRO_SOFTCLIP_MAX]; + struct regmap *regmap; +@@ -974,6 +979,7 @@ static int wsa_macro_hw_params(struct sn + struct snd_soc_dai *dai) + { + struct snd_soc_component *component = dai->component; ++ struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); + int ret; + + switch (substream->stream) { +@@ -986,6 +992,11 @@ static int wsa_macro_hw_params(struct sn + return ret; + } + break; ++ case SNDRV_PCM_STREAM_CAPTURE: ++ if (dai->id == WSA_MACRO_AIF_VI) ++ wsa->pcm_rate_vi = params_rate(params); ++ ++ break; + default: + break; + } +@@ -1159,6 +1170,28 @@ static int wsa_macro_enable_vi_feedback( + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); + u32 tx_reg0, tx_reg1; ++ u32 rate_val; ++ ++ switch (wsa->pcm_rate_vi) { ++ case 8000: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K; ++ break; ++ case 16000: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_16K; ++ break; ++ case 24000: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_24K; ++ break; ++ case 32000: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_32K; ++ break; ++ case 48000: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_48K; ++ break; ++ default: ++ rate_val = CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K; ++ break; ++ } + + if (test_bit(WSA_MACRO_TX0, &wsa->active_ch_mask[WSA_MACRO_AIF_VI])) { + tx_reg0 = CDC_WSA_TX0_SPKR_PROT_PATH_CTL; +@@ -1170,7 +1203,7 @@ static int wsa_macro_enable_vi_feedback( + + switch (event) { + case SND_SOC_DAPM_POST_PMU: +- /* Enable V&I sensing */ ++ /* Enable V&I sensing */ + snd_soc_component_update_bits(component, tx_reg0, + CDC_WSA_TX_SPKR_PROT_RESET_MASK, + CDC_WSA_TX_SPKR_PROT_RESET); +@@ -1179,10 +1212,10 @@ static int wsa_macro_enable_vi_feedback( + CDC_WSA_TX_SPKR_PROT_RESET); + snd_soc_component_update_bits(component, tx_reg0, + CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, +- CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K); ++ rate_val); + snd_soc_component_update_bits(component, tx_reg1, + CDC_WSA_TX_SPKR_PROT_PCM_RATE_MASK, +- CDC_WSA_TX_SPKR_PROT_PCM_RATE_8K); ++ rate_val); + snd_soc_component_update_bits(component, tx_reg0, + CDC_WSA_TX_SPKR_PROT_CLK_EN_MASK, + CDC_WSA_TX_SPKR_PROT_CLK_ENABLE); diff --git a/queue-6.6/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch b/queue-6.6/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch new file mode 100644 index 0000000000..63ebb70495 --- /dev/null +++ b/queue-6.6/asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch @@ -0,0 +1,46 @@ +From a31a4934b31faea76e735bab17e63d02fcd8e029 Mon Sep 17 00:00:00 2001 +From: Evgeny Pimenov +Date: Tue, 1 Apr 2025 23:40:58 +0300 +Subject: ASoC: qcom: Fix sc7280 lpass potential buffer overflow + +From: Evgeny Pimenov + +commit a31a4934b31faea76e735bab17e63d02fcd8e029 upstream. + +Case values introduced in commit +5f78e1fb7a3e ("ASoC: qcom: Add driver support for audioreach solution") +cause out of bounds access in arrays of sc7280 driver data (e.g. in case +of RX_CODEC_DMA_RX_0 in sc7280_snd_hw_params()). + +Redefine LPASS_MAX_PORTS to consider the maximum possible port id for +q6dsp as sc7280 driver utilizes some of those values. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Fixes: 77d0ffef793d ("ASoC: qcom: Add macro for lpass DAI id's max limit") +Cc: stable@vger.kernel.org # v6.0+ +Suggested-by: Mikhail Kobuk +Suggested-by: Alexey Khoroshilov +Signed-off-by: Evgeny Pimenov +Link: https://patch.msgid.link/20250401204058.32261-1-pimenoveu12@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/qcom/lpass.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/soc/qcom/lpass.h ++++ b/sound/soc/qcom/lpass.h +@@ -13,10 +13,11 @@ + #include + #include + #include ++#include + #include "lpass-hdmi.h" + + #define LPASS_AHBIX_CLOCK_FREQUENCY 131072000 +-#define LPASS_MAX_PORTS (LPASS_CDC_DMA_VA_TX8 + 1) ++#define LPASS_MAX_PORTS (DISPLAY_PORT_RX_7 + 1) + #define LPASS_MAX_MI2S_PORTS (8) + #define LPASS_MAX_DMA_CHANNELS (8) + #define LPASS_MAX_HDMI_DMA_CHANNELS (4) diff --git a/queue-6.6/asus-laptop-fix-an-uninitialized-variable.patch b/queue-6.6/asus-laptop-fix-an-uninitialized-variable.patch new file mode 100644 index 0000000000..49d92eb6c3 --- /dev/null +++ b/queue-6.6/asus-laptop-fix-an-uninitialized-variable.patch @@ -0,0 +1,56 @@ +From 6c683c6887e4addcd6bd1ddce08cafccb0a21e32 Mon Sep 17 00:00:00 2001 +From: Denis Arefev +Date: Thu, 3 Apr 2025 15:26:01 +0300 +Subject: asus-laptop: Fix an uninitialized variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Denis Arefev + +commit 6c683c6887e4addcd6bd1ddce08cafccb0a21e32 upstream. + +The value returned by acpi_evaluate_integer() is not checked, +but the result is not always successful, so it is necessary to +add a check of the returned value. + +If the result remains negative during three iterations of the loop, +then the uninitialized variable 'val' will be used in the clamp_val() +macro, so it must be initialized with the current value of the 'curr' +variable. + +In this case, the algorithm should be less noisy. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Fixes: b23910c2194e ("asus-laptop: Pegatron Lucid accelerometer") +Cc: stable@vger.kernel.org +Signed-off-by: Denis Arefev +Link: https://lore.kernel.org/r/20250403122603.18172-1-arefev@swemel.ru +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/asus-laptop.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/platform/x86/asus-laptop.c ++++ b/drivers/platform/x86/asus-laptop.c +@@ -427,11 +427,14 @@ static int asus_pega_lucid_set(struct as + + static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method) + { ++ unsigned long long val = (unsigned long long)curr; ++ acpi_status status; + int i, delta; +- unsigned long long val; +- for (i = 0; i < PEGA_ACC_RETRIES; i++) { +- acpi_evaluate_integer(asus->handle, method, NULL, &val); + ++ for (i = 0; i < PEGA_ACC_RETRIES; i++) { ++ status = acpi_evaluate_integer(asus->handle, method, NULL, &val); ++ if (ACPI_FAILURE(status)) ++ continue; + /* The output is noisy. From reading the ASL + * dissassembly, timeout errors are returned with 1's + * in the high word, and the lack of locking around diff --git a/queue-6.6/revert-pci-avoid-reset-when-disabled-via-sysfs.patch b/queue-6.6/revert-pci-avoid-reset-when-disabled-via-sysfs.patch new file mode 100644 index 0000000000..7d2e9fca37 --- /dev/null +++ b/queue-6.6/revert-pci-avoid-reset-when-disabled-via-sysfs.patch @@ -0,0 +1,59 @@ +From bc0b828ef6e561081ebc4c758d0c4d166bb9829c Mon Sep 17 00:00:00 2001 +From: Alex Williamson +Date: Mon, 14 Apr 2025 15:18:23 -0600 +Subject: Revert "PCI: Avoid reset when disabled via sysfs" + +From: Alex Williamson + +commit bc0b828ef6e561081ebc4c758d0c4d166bb9829c upstream. + +This reverts commit 479380efe1625e251008d24b2810283db60d6fcd. + +The reset_method attribute on a PCI device is only intended to manage the +availability of function scoped resets for a device. It was never intended +to restrict resets targeting the bus or slot. + +In introducing a restriction that each device must support function level +reset by testing pci_reset_supported(), we essentially create a catch-22, +that a device must have a function scope reset in order to support bus/slot +reset, when we use bus/slot reset to effect a reset of a device that does +not support a function scoped reset, especially multi-function devices. + +This breaks the majority of uses cases where vfio-pci uses bus/slot resets +to manage multifunction devices that do not support function scoped resets. + +Fixes: 479380efe162 ("PCI: Avoid reset when disabled via sysfs") +Reported-by: Cal Peake +Closes: https://lore.kernel.org/all/808e1111-27b7-f35b-6d5c-5b275e73677b@absolutedigital.net +Reported-by: Athul Krishna +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220010 +Signed-off-by: Alex Williamson +Signed-off-by: Bjorn Helgaas +Reviewed-by: Kevin Tian +Cc: stable@vger.kernel.org +Link: https://patch.msgid.link/20250414211828.3530741-1-alex.williamson@redhat.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/pci.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -5714,8 +5714,6 @@ static bool pci_bus_resettable(struct pc + return false; + + list_for_each_entry(dev, &bus->devices, bus_list) { +- if (!pci_reset_supported(dev)) +- return false; + if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET || + (dev->subordinate && !pci_bus_resettable(dev->subordinate))) + return false; +@@ -5792,8 +5790,6 @@ static bool pci_slot_resettable(struct p + list_for_each_entry(dev, &slot->bus->devices, bus_list) { + if (!dev->slot || dev->slot != slot) + continue; +- if (!pci_reset_supported(dev)) +- return false; + if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET || + (dev->subordinate && !pci_bus_resettable(dev->subordinate))) + return false; diff --git a/queue-6.6/series b/queue-6.6/series index 96aed59341..2111ebcaa9 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -297,3 +297,9 @@ kunit-qemu_configs-sh-respect-kunit-cmdline.patch riscv-kgdb-do-not-inline-arch_kgdb_breakpoint.patch riscv-kgdb-remove-.option-norvc-.option-rvc-for-kgdb.patch cpufreq-sched-fix-the-usage-of-cpufreq_need_update_l.patch +writeback-fix-false-warning-in-inode_to_wb.patch +revert-pci-avoid-reset-when-disabled-via-sysfs.patch +asoc-codecs-lpass-wsa-macro-fix-vi-feedback-rate.patch +asoc-codecs-lpass-wsa-macro-fix-logic-of-enabling-vi-channels.patch +asoc-qcom-fix-sc7280-lpass-potential-buffer-overflow.patch +asus-laptop-fix-an-uninitialized-variable.patch diff --git a/queue-6.6/writeback-fix-false-warning-in-inode_to_wb.patch b/queue-6.6/writeback-fix-false-warning-in-inode_to_wb.patch new file mode 100644 index 0000000000..45760aab4f --- /dev/null +++ b/queue-6.6/writeback-fix-false-warning-in-inode_to_wb.patch @@ -0,0 +1,37 @@ +From 9e888998ea4d22257b07ce911576509486fa0667 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Sat, 12 Apr 2025 18:39:12 +0200 +Subject: writeback: fix false warning in inode_to_wb() + +From: Andreas Gruenbacher + +commit 9e888998ea4d22257b07ce911576509486fa0667 upstream. + +inode_to_wb() is used also for filesystems that don't support cgroup +writeback. For these filesystems inode->i_wb is stable during the +lifetime of the inode (it points to bdi->wb) and there's no need to hold +locks protecting the inode->i_wb dereference. Improve the warning in +inode_to_wb() to not trigger for these filesystems. + +Link: https://lkml.kernel.org/r/20250412163914.3773459-3-agruenba@redhat.com +Fixes: aaa2cacf8184 ("writeback: add lockdep annotation to inode_to_wb()") +Signed-off-by: Jan Kara +Signed-off-by: Andreas Gruenbacher +Reviewed-by: Andreas Gruenbacher +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/backing-dev.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/linux/backing-dev.h ++++ b/include/linux/backing-dev.h +@@ -250,6 +250,7 @@ static inline struct bdi_writeback *inod + { + #ifdef CONFIG_LOCKDEP + WARN_ON_ONCE(debug_locks && ++ (inode->i_sb->s_iflags & SB_I_CGROUPWB) && + (!lockdep_is_held(&inode->i_lock) && + !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) && + !lockdep_is_held(&inode->i_wb->list_lock)));