From 4add5d51aadff35917b0bc5a89f7bbef89a1327f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 2 Sep 2025 13:56:38 +0200 Subject: [PATCH] 5.10-stable patches added patches: asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch hid-mcp2221-handle-reads-greater-than-60-bytes.patch revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch --- ...rink-platform_id-below-20-characters.patch | 95 +++++++++++++ ...rink-platform_id-below-20-characters.patch | 57 ++++++++ ...x98360a-fail-to-initialize-soundcard.patch | 36 +++++ ...latform_id-names-below-20-characters.patch | 109 +++++++++++++++ ...on-t-set-bus-speed-on-every-transfer.patch | 126 ++++++++++++++++++ ...1-handle-reads-greater-than-60-bytes.patch | 104 +++++++++++++++ ...ress-from-dpcd_rev-to-lane0_1_status.patch | 41 ++++++ queue-5.10/series | 7 + 8 files changed, 575 insertions(+) create mode 100644 queue-5.10/asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch create mode 100644 queue-5.10/asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch create mode 100644 queue-5.10/asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch create mode 100644 queue-5.10/asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch create mode 100644 queue-5.10/hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch create mode 100644 queue-5.10/hid-mcp2221-handle-reads-greater-than-60-bytes.patch create mode 100644 queue-5.10/revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch diff --git a/queue-5.10/asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch b/queue-5.10/asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch new file mode 100644 index 0000000000..8330fd06c8 --- /dev/null +++ b/queue-5.10/asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch @@ -0,0 +1,95 @@ +From 24e46fb811e991f56d5694b10ae7ceb8d2b8c846 Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Tue, 11 May 2021 16:37:02 -0500 +Subject: ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20 characters + +From: Pierre-Louis Bossart + +commit 24e46fb811e991f56d5694b10ae7ceb8d2b8c846 upstream. + +Sparse throwns the following warnings: + +sound/soc/intel/boards/bxt_da7219_max98357a.c:843:19: error: too long +initializer-string for array of char(no space for nul char) + +sound/soc/intel/boards/bxt_da7219_max98357a.c:844:19: error: too long +initializer-string for array of char(no space for nul char) + +sound/soc/intel/boards/bxt_da7219_max98357a.c:845:19: error: too long +initializer-string for array of char(no space for nul char) + +Fix by using the 'mx' acronyn for Maxim + +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Paul Olaru +Reviewed-by: Guennadi Liakhovetski +Reviewed-by: Rander Wang +Link: https://lore.kernel.org/r/20210511213707.32958-5-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Michał Górny +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ + sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +- + sound/soc/intel/common/soc-acpi-intel-cml-match.c | 2 +- + sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- + 4 files changed, 9 insertions(+), 9 deletions(-) + +--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c ++++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c +@@ -840,9 +840,9 @@ static int broxton_audio_probe(struct pl + } + + static const struct platform_device_id bxt_board_ids[] = { +- { .name = "bxt_da7219_max98357a" }, +- { .name = "glk_da7219_max98357a" }, +- { .name = "cml_da7219_max98357a" }, ++ { .name = "bxt_da7219_mx98357a" }, ++ { .name = "glk_da7219_mx98357a" }, ++ { .name = "cml_da7219_mx98357a" }, + { } + }; + +@@ -866,6 +866,6 @@ MODULE_AUTHOR("Naveen Manohar "); + MODULE_AUTHOR("Brent Lu "); + MODULE_LICENSE("GPL v2"); +-MODULE_ALIAS("platform:bxt_da7219_max98357a"); +-MODULE_ALIAS("platform:glk_da7219_max98357a"); +-MODULE_ALIAS("platform:cml_da7219_max98357a"); ++MODULE_ALIAS("platform:bxt_da7219_mx98357a"); ++MODULE_ALIAS("platform:glk_da7219_mx98357a"); ++MODULE_ALIAS("platform:cml_da7219_mx98357a"); +--- a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c +@@ -56,7 +56,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "DLGS7219", +- .drv_name = "bxt_da7219_max98357a", ++ .drv_name = "bxt_da7219_mx98357a", + .fw_filename = "intel/dsp_fw_bxtn.bin", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &bxt_codecs, +--- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c +@@ -54,7 +54,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "DLGS7219", +- .drv_name = "cml_da7219_max98357a", ++ .drv_name = "cml_da7219_mx98357a", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &max98357a_spk_codecs, + .sof_fw_filename = "sof-cml.ri", +--- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c +@@ -24,7 +24,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "DLGS7219", +- .drv_name = "glk_da7219_max98357a", ++ .drv_name = "glk_da7219_mx98357a", + .fw_filename = "intel/dsp_fw_glk.bin", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &glk_codecs, diff --git a/queue-5.10/asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch b/queue-5.10/asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch new file mode 100644 index 0000000000..b3ec7601fd --- /dev/null +++ b/queue-5.10/asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch @@ -0,0 +1,57 @@ +From bc47256afef38175a0ad6bcfd4dbab9d2c65b377 Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Mon, 21 Jun 2021 14:40:51 -0500 +Subject: ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters + +From: Pierre-Louis Bossart + +commit bc47256afef38175a0ad6bcfd4dbab9d2c65b377 upstream. + +Sparse throws the following warning: + +sound/soc/intel/boards/glk_rt5682_max98357a.c:622:25: error: too long +initializer-string for array of char(no space for nul char) + +Fix by using the 'mx' acronym for Maxim + +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Paul Olaru +Reviewed-by: Guennadi Liakhovetski +Reviewed-by: Rander Wang +Link: https://lore.kernel.org/r/20210621194057.21711-5-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Michał Górny +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/boards/glk_rt5682_max98357a.c | 4 ++-- + sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/soc/intel/boards/glk_rt5682_max98357a.c ++++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c +@@ -621,7 +621,7 @@ static int geminilake_audio_probe(struct + + static const struct platform_device_id glk_board_ids[] = { + { +- .name = "glk_rt5682_max98357a", ++ .name = "glk_rt5682_mx98357a", + .driver_data = + (kernel_ulong_t)&glk_audio_card_rt5682_m98357a, + }, +@@ -643,4 +643,4 @@ MODULE_DESCRIPTION("Geminilake Audio Mac + MODULE_AUTHOR("Naveen Manohar "); + MODULE_AUTHOR("Harsha Priya "); + MODULE_LICENSE("GPL v2"); +-MODULE_ALIAS("platform:glk_rt5682_max98357a"); ++MODULE_ALIAS("platform:glk_rt5682_mx98357a"); +--- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c +@@ -33,7 +33,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "10EC5682", +- .drv_name = "glk_rt5682_max98357a", ++ .drv_name = "glk_rt5682_mx98357a", + .fw_filename = "intel/dsp_fw_glk.bin", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &glk_codecs, diff --git a/queue-5.10/asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch b/queue-5.10/asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch new file mode 100644 index 0000000000..c3e9f1801a --- /dev/null +++ b/queue-5.10/asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch @@ -0,0 +1,36 @@ +From 0f32d9eb38c13c32895b5bf695eac639cee02d6c Mon Sep 17 00:00:00 2001 +From: Brent Lu +Date: Mon, 26 Jul 2021 17:45:25 +0800 +Subject: ASoC: Intel: sof_da7219_mx98360a: fail to initialize soundcard + +From: Brent Lu + +commit 0f32d9eb38c13c32895b5bf695eac639cee02d6c upstream. + +The default codec for speaker amp's DAI Link is max98373 and will be +overwritten in probe function if the board id is sof_da7219_mx98360a. +However, the probe function does not do it because the board id is +changed in earlier commit. + +Fixes: 1cc04d195dc2 ("ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters") +Signed-off-by: Brent Lu +Acked-by: Pierre-Louis Bossart +Link: https://lore.kernel.org/r/20210726094525.5748-1-brent.lu@intel.com +Signed-off-by: Mark Brown +Signed-off-by: Michał Górny +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/boards/sof_da7219_max98373.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/intel/boards/sof_da7219_max98373.c ++++ b/sound/soc/intel/boards/sof_da7219_max98373.c +@@ -404,7 +404,7 @@ static int audio_probe(struct platform_d + return -ENOMEM; + + /* By default dais[0] is configured for max98373 */ +- if (!strcmp(pdev->name, "sof_da7219_max98360a")) { ++ if (!strcmp(pdev->name, "sof_da7219_mx98360a")) { + dais[0] = (struct snd_soc_dai_link) { + .name = "SSP1-Codec", + .id = 0, diff --git a/queue-5.10/asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch b/queue-5.10/asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch new file mode 100644 index 0000000000..44d4261a97 --- /dev/null +++ b/queue-5.10/asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch @@ -0,0 +1,109 @@ +From 590cfb082837cc6c0c595adf1711330197c86a58 Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Mon, 21 Jun 2021 14:40:50 -0500 +Subject: ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters + +From: Pierre-Louis Bossart + +commit 590cfb082837cc6c0c595adf1711330197c86a58 upstream. + +Some Chromebooks machine driver aliases exceed 20 characters, which +leads to sparse warnings: + +sound/soc/intel/boards/sof_rt5682.c:959:25: error: too long +initializer-string for array of char(no space for nul char) + +sound/soc/intel/boards/sof_rt5682.c:989:25: error: too long +initializer-string for array of char(no space for nul char) + +sound/soc/intel/boards/sof_rt5682.c:1039:25: error: too long +initializer-string for array of char(no space for nul char) + +Fix by using the 'mx' shortcut for Maxim platforms (already used in +platform firmware) + +Signed-off-by: Pierre-Louis Bossart +Reviewed-by: Paul Olaru +Reviewed-by: Guennadi Liakhovetski +Reviewed-by: Rander Wang +Link: https://lore.kernel.org/r/20210621194057.21711-4-pierre-louis.bossart@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Michał Górny +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/boards/sof_rt5682.c | 12 ++++++------ + sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 2 +- + sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 4 ++-- + 3 files changed, 9 insertions(+), 9 deletions(-) + +--- a/sound/soc/intel/boards/sof_rt5682.c ++++ b/sound/soc/intel/boards/sof_rt5682.c +@@ -844,7 +844,7 @@ static const struct platform_device_id b + .name = "sof_rt5682", + }, + { +- .name = "tgl_max98357a_rt5682", ++ .name = "tgl_mx98357a_rt5682", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_SSP_CODEC(0) | + SOF_SPEAKER_AMP_PRESENT | +@@ -861,7 +861,7 @@ static const struct platform_device_id b + SOF_RT5682_SSP_AMP(1)), + }, + { +- .name = "tgl_max98373_rt5682", ++ .name = "tgl_mx98373_rt5682", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_SSP_CODEC(0) | + SOF_SPEAKER_AMP_PRESENT | +@@ -870,7 +870,7 @@ static const struct platform_device_id b + SOF_RT5682_NUM_HDMIDEV(4)), + }, + { +- .name = "jsl_rt5682_max98360a", ++ .name = "jsl_rt5682_mx98360a", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_MCLK_24MHZ | + SOF_RT5682_SSP_CODEC(0) | +@@ -898,7 +898,7 @@ MODULE_AUTHOR("Bard Liao "); + MODULE_LICENSE("GPL v2"); + MODULE_ALIAS("platform:sof_rt5682"); +-MODULE_ALIAS("platform:tgl_max98357a_rt5682"); ++MODULE_ALIAS("platform:tgl_mx98357a_rt5682"); + MODULE_ALIAS("platform:jsl_rt5682_rt1015"); +-MODULE_ALIAS("platform:tgl_max98373_rt5682"); +-MODULE_ALIAS("platform:jsl_rt5682_max98360a"); ++MODULE_ALIAS("platform:tgl_mx98373_rt5682"); ++MODULE_ALIAS("platform:jsl_rt5682_mx98360a"); +--- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +@@ -54,7 +54,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "10EC5682", +- .drv_name = "jsl_rt5682_max98360a", ++ .drv_name = "jsl_rt5682_mx98360a", + .sof_fw_filename = "sof-jsl.ri", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &mx98360a_spk, +--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c ++++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +@@ -321,7 +321,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "10EC5682", +- .drv_name = "tgl_max98357a_rt5682", ++ .drv_name = "tgl_mx98357a_rt5682", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &tgl_codecs, + .sof_fw_filename = "sof-tgl.ri", +@@ -329,7 +329,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_in + }, + { + .id = "10EC5682", +- .drv_name = "tgl_max98373_rt5682", ++ .drv_name = "tgl_mx98373_rt5682", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &tgl_max98373_amp, + .sof_fw_filename = "sof-tgl.ri", diff --git a/queue-5.10/hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch b/queue-5.10/hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch new file mode 100644 index 0000000000..74aa703ce0 --- /dev/null +++ b/queue-5.10/hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch @@ -0,0 +1,126 @@ +From 02a46753601a24e1673d9c28173121055e8e6cc9 Mon Sep 17 00:00:00 2001 +From: Hamish Martin +Date: Wed, 25 Oct 2023 16:55:13 +1300 +Subject: HID: mcp2221: Don't set bus speed on every transfer + +From: Hamish Martin + +commit 02a46753601a24e1673d9c28173121055e8e6cc9 upstream. + +Since the initial commit of this driver the I2C bus speed has been +reconfigured for every single transfer. This is despite the fact that we +never change the speed and it is never "lost" by the chip. +Upon investigation we find that what was really happening was that the +setting of the bus speed had the side effect of cancelling a previous +failed command if there was one, thereby freeing the bus. This is the +part that was actually required to keep the bus operational in the face +of failed commands. + +Instead of always setting the speed, we now correctly cancel any failed +commands as they are detected. This means we can just set the bus speed +at probe time and remove the previous speed sets on each transfer. +This has the effect of improving performance and reducing the number of +commands required to complete transfers. + +Signed-off-by: Hamish Martin +Signed-off-by: Jiri Kosina +Fixes: 67a95c21463d ("HID: mcp2221: add usb to i2c-smbus host bridge") +[romain.sioen@microchip.com: backport to stable, up to 6.8. Add "Fixes" tag] +Signed-off-by: Romain Sioen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-mcp2221.c | 41 +++++++++++++++++++++++++++-------------- + 1 file changed, 27 insertions(+), 14 deletions(-) + +--- a/drivers/hid/hid-mcp2221.c ++++ b/drivers/hid/hid-mcp2221.c +@@ -169,6 +169,25 @@ static int mcp_cancel_last_cmd(struct mc + return mcp_send_data_req_status(mcp, mcp->txbuf, 8); + } + ++/* Check if the last command succeeded or failed and return the result. ++ * If the command did fail, cancel that command which will free the i2c bus. ++ */ ++static int mcp_chk_last_cmd_status_free_bus(struct mcp2221 *mcp) ++{ ++ int ret; ++ ++ ret = mcp_chk_last_cmd_status(mcp); ++ if (ret) { ++ /* The last command was a failure. ++ * Send a cancel which will also free the bus. ++ */ ++ usleep_range(980, 1000); ++ mcp_cancel_last_cmd(mcp); ++ } ++ ++ return ret; ++} ++ + static int mcp_set_i2c_speed(struct mcp2221 *mcp) + { + int ret; +@@ -223,7 +242,7 @@ static int mcp_i2c_write(struct mcp2221 + usleep_range(980, 1000); + + if (last_status) { +- ret = mcp_chk_last_cmd_status(mcp); ++ ret = mcp_chk_last_cmd_status_free_bus(mcp); + if (ret) + return ret; + } +@@ -290,7 +309,7 @@ static int mcp_i2c_smbus_read(struct mcp + if (ret) + return ret; + +- ret = mcp_chk_last_cmd_status(mcp); ++ ret = mcp_chk_last_cmd_status_free_bus(mcp); + if (ret) + return ret; + +@@ -310,11 +329,6 @@ static int mcp_i2c_xfer(struct i2c_adapt + + mutex_lock(&mcp->lock); + +- /* Setting speed before every transaction is required for mcp2221 */ +- ret = mcp_set_i2c_speed(mcp); +- if (ret) +- goto exit; +- + if (num == 1) { + if (msgs->flags & I2C_M_RD) { + ret = mcp_i2c_smbus_read(mcp, msgs, MCP2221_I2C_RD_DATA, +@@ -399,9 +413,7 @@ static int mcp_smbus_write(struct mcp222 + if (last_status) { + usleep_range(980, 1000); + +- ret = mcp_chk_last_cmd_status(mcp); +- if (ret) +- return ret; ++ ret = mcp_chk_last_cmd_status_free_bus(mcp); + } + + return ret; +@@ -419,10 +431,6 @@ static int mcp_smbus_xfer(struct i2c_ada + + mutex_lock(&mcp->lock); + +- ret = mcp_set_i2c_speed(mcp); +- if (ret) +- goto exit; +- + switch (size) { + + case I2C_SMBUS_QUICK: +@@ -870,6 +878,11 @@ static int mcp2221_probe(struct hid_devi + if (i2c_clk_freq < 50) + i2c_clk_freq = 50; + mcp->cur_i2c_clk_div = (12000000 / (i2c_clk_freq * 1000)) - 3; ++ ret = mcp_set_i2c_speed(mcp); ++ if (ret) { ++ hid_err(hdev, "can't set i2c speed: %d\n", ret); ++ return ret; ++ } + + mcp->adapter.owner = THIS_MODULE; + mcp->adapter.class = I2C_CLASS_HWMON; diff --git a/queue-5.10/hid-mcp2221-handle-reads-greater-than-60-bytes.patch b/queue-5.10/hid-mcp2221-handle-reads-greater-than-60-bytes.patch new file mode 100644 index 0000000000..121316941c --- /dev/null +++ b/queue-5.10/hid-mcp2221-handle-reads-greater-than-60-bytes.patch @@ -0,0 +1,104 @@ +From 2682468671aa0b4d52ae09779b48212a80d71b91 Mon Sep 17 00:00:00 2001 +From: Hamish Martin +Date: Wed, 25 Oct 2023 16:55:14 +1300 +Subject: HID: mcp2221: Handle reads greater than 60 bytes + +From: Hamish Martin + +commit 2682468671aa0b4d52ae09779b48212a80d71b91 upstream. + +When a user requests more than 60 bytes of data the MCP2221 must chunk +the data in chunks up to 60 bytes long (see command/response code 0x40 +in the datasheet). +In order to signal that the device has more data the (undocumented) byte +at byte index 2 of the Get I2C Data response uses the value 0x54. This +contrasts with the case for the final data chunk where the value +returned is 0x55 (MCP2221_I2C_READ_COMPL). The fact that 0x55 was not +returned in the response was interpreted by the driver as a failure +meaning that all reads of more than 60 bytes would fail. + +Add support for reads that are split over multiple chunks by looking for +the response code indicating that more data is expected and continuing +the read as the code intended. Some timing delays are required to ensure +the chip has time to refill its FIFO as data is read in from the I2C +bus. This timing has been tested in my system when configured for bus +speeds of 50KHz, 100KHz, and 400KHz and operates well. + +Signed-off-by: Hamish Martin +Signed-off-by: Jiri Kosina +Fixes: 67a95c21463d0 ("HID: mcp2221: add usb to i2c-smbus host bridge") +[romain.sioen@microchip.com: backport to stable, up to 6.8. Add "Fixes" tag] +Signed-off-by: Romain Sioen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-mcp2221.c | 32 +++++++++++++++++++++++--------- + 1 file changed, 23 insertions(+), 9 deletions(-) + +--- a/drivers/hid/hid-mcp2221.c ++++ b/drivers/hid/hid-mcp2221.c +@@ -44,6 +44,7 @@ enum { + MCP2221_I2C_MASK_ADDR_NACK = 0x40, + MCP2221_I2C_WRADDRL_SEND = 0x21, + MCP2221_I2C_ADDR_NACK = 0x25, ++ MCP2221_I2C_READ_PARTIAL = 0x54, + MCP2221_I2C_READ_COMPL = 0x55, + MCP2221_ALT_F_NOT_GPIOV = 0xEE, + MCP2221_ALT_F_NOT_GPIOD = 0xEF, +@@ -279,6 +280,7 @@ static int mcp_i2c_smbus_read(struct mcp + { + int ret; + u16 total_len; ++ int retries = 0; + + mcp->txbuf[0] = type; + if (msg) { +@@ -302,20 +304,31 @@ static int mcp_i2c_smbus_read(struct mcp + mcp->rxbuf_idx = 0; + + do { ++ /* Wait for the data to be read by the device */ ++ usleep_range(980, 1000); ++ + memset(mcp->txbuf, 0, 4); + mcp->txbuf[0] = MCP2221_I2C_GET_DATA; + + ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1); +- if (ret) +- return ret; +- +- ret = mcp_chk_last_cmd_status_free_bus(mcp); +- if (ret) +- return ret; +- +- usleep_range(980, 1000); ++ if (ret) { ++ if (retries < 5) { ++ /* The data wasn't ready to read. ++ * Wait a bit longer and try again. ++ */ ++ usleep_range(90, 100); ++ retries++; ++ } else { ++ return ret; ++ } ++ } else { ++ retries = 0; ++ } + } while (mcp->rxbuf_idx < total_len); + ++ usleep_range(980, 1000); ++ ret = mcp_chk_last_cmd_status_free_bus(mcp); ++ + return ret; + } + +@@ -776,7 +789,8 @@ static int mcp2221_raw_event(struct hid_ + mcp->status = -EIO; + break; + } +- if (data[2] == MCP2221_I2C_READ_COMPL) { ++ if (data[2] == MCP2221_I2C_READ_COMPL || ++ data[2] == MCP2221_I2C_READ_PARTIAL) { + buf = mcp->rxbuf; + memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]); + mcp->rxbuf_idx = mcp->rxbuf_idx + data[3]; diff --git a/queue-5.10/revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch b/queue-5.10/revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch new file mode 100644 index 0000000000..2fa0ef862e --- /dev/null +++ b/queue-5.10/revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch @@ -0,0 +1,41 @@ +From imre.deak@intel.com Tue Sep 2 13:49:03 2025 +From: Imre Deak +Date: Thu, 28 Aug 2025 20:49:27 +0300 +Subject: Revert "drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS" +To: +Cc: , , Sasha Levin +Message-ID: <20250828174932.414566-2-imre.deak@intel.com> + +From: Imre Deak + +This reverts commit 89d17a2d89a83c5b7643ca934651a3f9229e4734 which is +commit a40c5d727b8111b5db424a1e43e14a1dcce1e77f upstream. + +The upstream commit a40c5d727b8111b5db424a1e43e14a1dcce1e77f ("drm/dp: +Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS") the +reverted commit backported causes a regression, on one eDP panel at +least resulting in display flickering, described in detail at the Link: +below. The issue fixed by the upstream commit will need a different +solution, revert the backport for now. + +Cc: intel-gfx@lists.freedesktop.org +Cc: dri-devel@lists.freedesktop.org +Cc: Sasha Levin +Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14558 +Signed-off-by: Imre Deak +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_dp_helper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/drm_dp_helper.c ++++ b/drivers/gpu/drm/drm_dp_helper.c +@@ -299,7 +299,7 @@ ssize_t drm_dp_dpcd_read(struct drm_dp_a + * monitor doesn't power down exactly after the throw away read. + */ + if (!aux->is_remote) { +- ret = drm_dp_dpcd_access(aux, DP_AUX_NATIVE_READ, DP_LANE0_1_STATUS, ++ ret = drm_dp_dpcd_access(aux, DP_AUX_NATIVE_READ, DP_DPCD_REV, + buffer, 1); + if (ret != 1) + goto out; diff --git a/queue-5.10/series b/queue-5.10/series index e81897bdcb..d31f70a564 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -24,3 +24,10 @@ revert-drm-amdgpu-fix-incorrect-vm-flags-to-map-bo.patch dma-pool-ensure-dma_direct_remap-allocations-are-decrypted.patch net-usb-qmi_wwan-add-telit-cinterion-le910c4-wwx-new-compositions.patch drm-nouveau-disp-always-accept-linear-modifier.patch +hid-mcp2221-don-t-set-bus-speed-on-every-transfer.patch +hid-mcp2221-handle-reads-greater-than-60-bytes.patch +revert-drm-dp-change-aux-dpcd-probe-address-from-dpcd_rev-to-lane0_1_status.patch +asoc-intel-bxt_da7219_max98357a-shrink-platform_id-below-20-characters.patch +asoc-intel-sof_rt5682-shrink-platform_id-names-below-20-characters.patch +asoc-intel-glk_rt5682_max98357a-shrink-platform_id-below-20-characters.patch +asoc-intel-sof_da7219_mx98360a-fail-to-initialize-soundcard.patch -- 2.47.3