From: Greg Kroah-Hartman Date: Mon, 26 Aug 2024 11:47:54 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.1.107~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51cba4f43c464116da1b1a20ce4a928026e9a659;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.1.patch drm-amdgpu-validate-ta-binary-size.patch hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch ksmbd-the-buffer-of-smb2-query-dir-response-has-at-least-1-byte.patch mips-loongson64-set-timer-mode-in-cpu-probe.patch net-dsa-microchip-fix-ptp-config-failure-when-using-multiple-ports.patch net-ngbe-fix-phy-mode-set-to-external-phy.patch platform-x86-dell-uart-backlight-use-acpi_video_get_backlight_type.patch platform-x86-isst-fix-return-value-on-last-invalid-resource.patch s390-ap-refine-ap-bus-bindings-complete-processing.patch scsi-core-fix-the-return-value-of-scsi_logical_block_count.patch --- diff --git a/queue-6.10/drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.1.patch b/queue-6.10/drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.1.patch new file mode 100644 index 00000000000..2bfe6963faa --- /dev/null +++ b/queue-6.10/drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.1.patch @@ -0,0 +1,50 @@ +From e3e4bf58bad1576ac732a1429f53e3d4bfb82b4b Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 14 Aug 2024 10:28:24 -0400 +Subject: drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1 + +From: Alex Deucher + +commit e3e4bf58bad1576ac732a1429f53e3d4bfb82b4b upstream. + +The workaround seems to cause stability issues on other +SDMA 5.2.x IPs. + +Fixes: a03ebf116303 ("drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell") +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3556 +Acked-by: Ruijing Dong +Signed-off-by: Alex Deucher +(cherry picked from commit 2dc3851ef7d9c5439ea8e9623fc36878f3b40649) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c ++++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +@@ -176,14 +176,16 @@ static void sdma_v5_2_ring_set_wptr(stru + DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n", + ring->doorbell_index, ring->wptr << 2); + WDOORBELL64(ring->doorbell_index, ring->wptr << 2); +- /* SDMA seems to miss doorbells sometimes when powergating kicks in. +- * Updating the wptr directly will wake it. This is only safe because +- * we disallow gfxoff in begin_use() and then allow it again in end_use(). +- */ +- WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR), +- lower_32_bits(ring->wptr << 2)); +- WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI), +- upper_32_bits(ring->wptr << 2)); ++ if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) == IP_VERSION(5, 2, 1)) { ++ /* SDMA seems to miss doorbells sometimes when powergating kicks in. ++ * Updating the wptr directly will wake it. This is only safe because ++ * we disallow gfxoff in begin_use() and then allow it again in end_use(). ++ */ ++ WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR), ++ lower_32_bits(ring->wptr << 2)); ++ WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI), ++ upper_32_bits(ring->wptr << 2)); ++ } + } else { + DRM_DEBUG("Not using doorbell -- " + "mmSDMA%i_GFX_RB_WPTR == 0x%08x " diff --git a/queue-6.10/drm-amdgpu-validate-ta-binary-size.patch b/queue-6.10/drm-amdgpu-validate-ta-binary-size.patch new file mode 100644 index 00000000000..d788bef01dc --- /dev/null +++ b/queue-6.10/drm-amdgpu-validate-ta-binary-size.patch @@ -0,0 +1,33 @@ +From c99769bceab4ecb6a067b9af11f9db281eea3e2a Mon Sep 17 00:00:00 2001 +From: Candice Li +Date: Thu, 15 Aug 2024 11:37:28 +0800 +Subject: drm/amdgpu: Validate TA binary size + +From: Candice Li + +commit c99769bceab4ecb6a067b9af11f9db281eea3e2a upstream. + +Add TA binary size validation to avoid OOB write. + +Signed-off-by: Candice Li +Reviewed-by: Hawking Zhang +Signed-off-by: Alex Deucher +(cherry picked from commit c0a04e3570d72aaf090962156ad085e37c62e442) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c +@@ -166,6 +166,9 @@ static ssize_t ta_if_load_debugfs_write( + if (ret) + return -EFAULT; + ++ if (ta_bin_len > PSP_1_MEG) ++ return -EINVAL; ++ + copy_pos += sizeof(uint32_t); + + ta_bin = kzalloc(ta_bin_len, GFP_KERNEL); diff --git a/queue-6.10/hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch b/queue-6.10/hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch new file mode 100644 index 00000000000..f0cfb8814bc --- /dev/null +++ b/queue-6.10/hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch @@ -0,0 +1,49 @@ +From 1b8f9c1fb464968a5b18d3acc1da8c00bad24fad Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Tue, 30 Jul 2024 08:51:55 -0700 +Subject: HID: wacom: Defer calculation of resolution until resolution_code is known + +From: Jason Gerecke + +commit 1b8f9c1fb464968a5b18d3acc1da8c00bad24fad upstream. + +The Wacom driver maps the HID_DG_TWIST usage to ABS_Z (rather than ABS_RZ) +for historic reasons. When the code to support twist was introduced in +commit 50066a042da5 ("HID: wacom: generic: Add support for height, tilt, +and twist usages"), we were careful to write it in such a way that it had +HID calculate the resolution of the twist axis assuming ABS_RZ instead +(so that we would get correct angular behavior). This was broken with +the introduction of commit 08a46b4190d3 ("HID: wacom: Set a default +resolution for older tablets"), which moved the resolution calculation +to occur *before* the adjustment from ABS_Z to ABS_RZ occurred. + +This commit moves the calculation of resolution after the point that +we are finished setting things up for its proper use. + +Signed-off-by: Jason Gerecke +Fixes: 08a46b4190d3 ("HID: wacom: Set a default resolution for older tablets") +Cc: stable@vger.kernel.org +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/wacom_wac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/hid/wacom_wac.c ++++ b/drivers/hid/wacom_wac.c +@@ -1924,12 +1924,14 @@ static void wacom_map_usage(struct input + int fmax = field->logical_maximum; + unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid); + int resolution_code = code; +- int resolution = hidinput_calc_abs_res(field, resolution_code); ++ int resolution; + + if (equivalent_usage == HID_DG_TWIST) { + resolution_code = ABS_RZ; + } + ++ resolution = hidinput_calc_abs_res(field, resolution_code); ++ + if (equivalent_usage == HID_GD_X) { + fmin += features->offset_left; + fmax -= features->offset_right; diff --git a/queue-6.10/ksmbd-the-buffer-of-smb2-query-dir-response-has-at-least-1-byte.patch b/queue-6.10/ksmbd-the-buffer-of-smb2-query-dir-response-has-at-least-1-byte.patch new file mode 100644 index 00000000000..e77961736bf --- /dev/null +++ b/queue-6.10/ksmbd-the-buffer-of-smb2-query-dir-response-has-at-least-1-byte.patch @@ -0,0 +1,35 @@ +From ce61b605a00502c59311d0a4b1f58d62b48272d0 Mon Sep 17 00:00:00 2001 +From: Namjae Jeon +Date: Tue, 20 Aug 2024 22:07:38 +0900 +Subject: ksmbd: the buffer of smb2 query dir response has at least 1 byte + +From: Namjae Jeon + +commit ce61b605a00502c59311d0a4b1f58d62b48272d0 upstream. + +When STATUS_NO_MORE_FILES status is set to smb2 query dir response, +->StructureSize is set to 9, which mean buffer has 1 byte. +This issue occurs because ->Buffer[1] in smb2_query_directory_rsp to +flex-array. + +Fixes: eb3e28c1e89b ("smb3: Replace smb2pdu 1-element arrays with flex-arrays") +Cc: stable@vger.kernel.org # v6.1+ +Signed-off-by: Namjae Jeon +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/smb/server/smb2pdu.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/smb/server/smb2pdu.c ++++ b/fs/smb/server/smb2pdu.c +@@ -4406,7 +4406,8 @@ int smb2_query_dir(struct ksmbd_work *wo + rsp->OutputBufferLength = cpu_to_le32(0); + rsp->Buffer[0] = 0; + rc = ksmbd_iov_pin_rsp(work, (void *)rsp, +- sizeof(struct smb2_query_directory_rsp)); ++ offsetof(struct smb2_query_directory_rsp, Buffer) ++ + 1); + if (rc) + goto err_out; + } else { diff --git a/queue-6.10/mips-loongson64-set-timer-mode-in-cpu-probe.patch b/queue-6.10/mips-loongson64-set-timer-mode-in-cpu-probe.patch new file mode 100644 index 00000000000..69d4c88b369 --- /dev/null +++ b/queue-6.10/mips-loongson64-set-timer-mode-in-cpu-probe.patch @@ -0,0 +1,47 @@ +From 1cb6ab446424649f03c82334634360c2e3043684 Mon Sep 17 00:00:00 2001 +From: Jiaxun Yang +Date: Tue, 23 Jul 2024 17:15:44 +0800 +Subject: MIPS: Loongson64: Set timer mode in cpu-probe + +From: Jiaxun Yang + +commit 1cb6ab446424649f03c82334634360c2e3043684 upstream. + +Loongson64 C and G processors have EXTIMER feature which +is conflicting with CP0 counter. + +Although the processor resets in EXTIMER disabled & INTIMER +enabled mode, which is compatible with MIPS CP0 compare, firmware +may attempt to enable EXTIMER and interfere CP0 compare. + +Set timer mode back to MIPS compatible mode to fix booting on +systems with such firmware before we have an actual driver for +EXTIMER. + +Cc: stable@vger.kernel.org +Signed-off-by: Jiaxun Yang +Signed-off-by: Thomas Bogendoerfer +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/kernel/cpu-probe.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/mips/kernel/cpu-probe.c ++++ b/arch/mips/kernel/cpu-probe.c +@@ -1724,12 +1724,16 @@ static inline void cpu_probe_loongson(st + c->ases |= (MIPS_ASE_LOONGSON_MMI | MIPS_ASE_LOONGSON_CAM | + MIPS_ASE_LOONGSON_EXT | MIPS_ASE_LOONGSON_EXT2); + c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */ ++ change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER, ++ LOONGSON_CONF6_INTIMER); + break; + case PRID_IMP_LOONGSON_64G: + __cpu_name[cpu] = "ICT Loongson-3"; + set_elf_platform(cpu, "loongson3a"); + set_isa(c, MIPS_CPU_ISA_M64R2); + decode_cpucfg(c); ++ change_c0_config6(LOONGSON_CONF6_EXTIMER | LOONGSON_CONF6_INTIMER, ++ LOONGSON_CONF6_INTIMER); + break; + default: + panic("Unknown Loongson Processor ID!"); diff --git a/queue-6.10/net-dsa-microchip-fix-ptp-config-failure-when-using-multiple-ports.patch b/queue-6.10/net-dsa-microchip-fix-ptp-config-failure-when-using-multiple-ports.patch new file mode 100644 index 00000000000..f0d2a4fa337 --- /dev/null +++ b/queue-6.10/net-dsa-microchip-fix-ptp-config-failure-when-using-multiple-ports.patch @@ -0,0 +1,55 @@ +From 6efea5135417ae8194485d1d05ea79a21cf1a11c Mon Sep 17 00:00:00 2001 +From: Martin Whitaker +Date: Sat, 17 Aug 2024 10:41:41 +0100 +Subject: net: dsa: microchip: fix PTP config failure when using multiple ports + +From: Martin Whitaker + +commit 6efea5135417ae8194485d1d05ea79a21cf1a11c upstream. + +When performing the port_hwtstamp_set operation, ptp_schedule_worker() +will be called if hardware timestamoing is enabled on any of the ports. +When using multiple ports for PTP, port_hwtstamp_set is executed for +each port. When called for the first time ptp_schedule_worker() returns +0. On subsequent calls it returns 1, indicating the worker is already +scheduled. Currently the ksz driver treats 1 as an error and fails to +complete the port_hwtstamp_set operation, thus leaving the timestamping +configuration for those ports unchanged. + +This patch fixes this by ignoring the ptp_schedule_worker() return +value. + +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/7aae307a-35ca-4209-a850-7b2749d40f90@martin-whitaker.me.uk +Fixes: bb01ad30570b0 ("net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock") +Signed-off-by: Martin Whitaker +Reviewed-by: Andrew Lunn +Acked-by: Arun Ramadoss +Link: https://patch.msgid.link/20240817094141.3332-1-foss@martin-whitaker.me.uk +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/dsa/microchip/ksz_ptp.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/net/dsa/microchip/ksz_ptp.c ++++ b/drivers/net/dsa/microchip/ksz_ptp.c +@@ -266,7 +266,6 @@ static int ksz_ptp_enable_mode(struct ks + struct ksz_port *prt; + struct dsa_port *dp; + bool tag_en = false; +- int ret; + + dsa_switch_for_each_user_port(dp, dev->ds) { + prt = &dev->ports[dp->index]; +@@ -277,9 +276,7 @@ static int ksz_ptp_enable_mode(struct ks + } + + if (tag_en) { +- ret = ptp_schedule_worker(ptp_data->clock, 0); +- if (ret) +- return ret; ++ ptp_schedule_worker(ptp_data->clock, 0); + } else { + ptp_cancel_worker_sync(ptp_data->clock); + } diff --git a/queue-6.10/net-ngbe-fix-phy-mode-set-to-external-phy.patch b/queue-6.10/net-ngbe-fix-phy-mode-set-to-external-phy.patch new file mode 100644 index 00000000000..9c95410a754 --- /dev/null +++ b/queue-6.10/net-ngbe-fix-phy-mode-set-to-external-phy.patch @@ -0,0 +1,43 @@ +From f2916c83d746eb99f50f42c15cf4c47c2ea5f3b3 Mon Sep 17 00:00:00 2001 +From: Mengyuan Lou +Date: Tue, 20 Aug 2024 11:04:25 +0800 +Subject: net: ngbe: Fix phy mode set to external phy + +From: Mengyuan Lou + +commit f2916c83d746eb99f50f42c15cf4c47c2ea5f3b3 upstream. + +The MAC only has add the TX delay and it can not be modified. +MAC and PHY are both set the TX delay cause transmission problems. +So just disable TX delay in PHY, when use rgmii to attach to +external phy, set PHY_INTERFACE_MODE_RGMII_RXID to phy drivers. +And it is does not matter to internal phy. + +Fixes: bc2426d74aa3 ("net: ngbe: convert phylib to phylink") +Signed-off-by: Mengyuan Lou +Cc: stable@vger.kernel.org # 6.3+ +Reviewed-by: Jacob Keller +Link: https://patch.msgid.link/E6759CF1387CF84C+20240820030425.93003-1-mengyuanlou@net-swift.com +Signed-off-by: Paolo Abeni +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c ++++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c +@@ -124,8 +124,12 @@ static int ngbe_phylink_init(struct wx * + MAC_SYM_PAUSE | MAC_ASYM_PAUSE; + config->mac_managed_pm = true; + +- phy_mode = PHY_INTERFACE_MODE_RGMII_ID; +- __set_bit(PHY_INTERFACE_MODE_RGMII_ID, config->supported_interfaces); ++ /* The MAC only has add the Tx delay and it can not be modified. ++ * So just disable TX delay in PHY, and it is does not matter to ++ * internal phy. ++ */ ++ phy_mode = PHY_INTERFACE_MODE_RGMII_RXID; ++ __set_bit(PHY_INTERFACE_MODE_RGMII_RXID, config->supported_interfaces); + + phylink = phylink_create(config, NULL, phy_mode, &ngbe_mac_ops); + if (IS_ERR(phylink)) diff --git a/queue-6.10/platform-x86-dell-uart-backlight-use-acpi_video_get_backlight_type.patch b/queue-6.10/platform-x86-dell-uart-backlight-use-acpi_video_get_backlight_type.patch new file mode 100644 index 00000000000..60268132548 --- /dev/null +++ b/queue-6.10/platform-x86-dell-uart-backlight-use-acpi_video_get_backlight_type.patch @@ -0,0 +1,76 @@ +From b5f0943001339c4d324a1af10470ce0bdd79f966 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 14 Aug 2024 21:01:58 +0200 +Subject: platform/x86: dell-uart-backlight: Use acpi_video_get_backlight_type() + +From: Hans de Goede + +commit b5f0943001339c4d324a1af10470ce0bdd79f966 upstream. + +The dell-uart-backlight driver supports backlight control on Dell All In +One (AIO) models using a backlight controller board connected to an UART. + +In DSDT this uart port will be defined as: + + Name (_HID, "DELL0501") + Name (_CID, EisaId ("PNP0501") + +Now the first AIO has turned up which has not only the DSDT bits for this, +but also an actual controller attached to the UART, yet it is not using +this controller for backlight control. + +Use the acpi_video_get_backlight_type() function from the ACPI video-detect +code to check if the dell-uart-backlight driver should actually be used. +This allows reusing the existing ACPI video-detect infra to override +the backlight control method on the commandline or with DMI quirks. + +Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver") +Cc: All applicable +Signed-off-by: Hans de Goede +Reviewed-by: Andy Shevchenko +Link: https://patch.msgid.link/20240814190159.15650-3-hdegoede@redhat.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/dell/Kconfig | 1 + + drivers/platform/x86/dell/dell-uart-backlight.c | 8 ++++++++ + 2 files changed, 9 insertions(+) + +--- a/drivers/platform/x86/dell/Kconfig ++++ b/drivers/platform/x86/dell/Kconfig +@@ -148,6 +148,7 @@ config DELL_SMO8800 + config DELL_UART_BACKLIGHT + tristate "Dell AIO UART Backlight driver" + depends on ACPI ++ depends on ACPI_VIDEO + depends on BACKLIGHT_CLASS_DEVICE + depends on SERIAL_DEV_BUS + help +--- a/drivers/platform/x86/dell/dell-uart-backlight.c ++++ b/drivers/platform/x86/dell/dell-uart-backlight.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "../serdev_helpers.h" + + /* The backlight controller must respond within 1 second */ +@@ -332,10 +333,17 @@ struct serdev_device_driver dell_uart_bl + + static int dell_uart_bl_pdev_probe(struct platform_device *pdev) + { ++ enum acpi_backlight_type bl_type; + struct serdev_device *serdev; + struct device *ctrl_dev; + int ret; + ++ bl_type = acpi_video_get_backlight_type(); ++ if (bl_type != acpi_backlight_dell_uart) { ++ dev_dbg(&pdev->dev, "Not loading (ACPI backlight type = %d)\n", bl_type); ++ return -ENODEV; ++ } ++ + ctrl_dev = get_serdev_controller("DELL0501", NULL, 0, "serial0"); + if (IS_ERR(ctrl_dev)) + return PTR_ERR(ctrl_dev); diff --git a/queue-6.10/platform-x86-isst-fix-return-value-on-last-invalid-resource.patch b/queue-6.10/platform-x86-isst-fix-return-value-on-last-invalid-resource.patch new file mode 100644 index 00000000000..bc6e71da531 --- /dev/null +++ b/queue-6.10/platform-x86-isst-fix-return-value-on-last-invalid-resource.patch @@ -0,0 +1,50 @@ +From 46ee21e9f59205e54943dfe51b2dc8a9352ca37d Mon Sep 17 00:00:00 2001 +From: Srinivas Pandruvada +Date: Fri, 16 Aug 2024 09:36:26 -0700 +Subject: platform/x86: ISST: Fix return value on last invalid resource +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Srinivas Pandruvada + +commit 46ee21e9f59205e54943dfe51b2dc8a9352ca37d upstream. + +When only the last resource is invalid, tpmi_sst_dev_add() is returing +error even if there are other valid resources before. This function +should return error when there are no valid resources. + +Here tpmi_sst_dev_add() is returning "ret" variable. But this "ret" +variable contains the failure status of last call to sst_main(), which +failed for the invalid resource. But there may be other valid resources +before the last entry. + +To address this, do not update "ret" variable for sst_main() return +status. + +If there are no valid resources, it is already checked for by !inst +below the loop and -ENODEV is returned. + +Fixes: 9d1d36268f3d ("platform/x86: ISST: Support partitioned systems") +Signed-off-by: Srinivas Pandruvada +Cc: stable@vger.kernel.org # 6.10+ +Link: https://lore.kernel.org/r/20240816163626.415762-1-srinivas.pandruvada@linux.intel.com +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c ++++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +@@ -1549,8 +1549,7 @@ int tpmi_sst_dev_add(struct auxiliary_de + goto unlock_free; + } + +- ret = sst_main(auxdev, &pd_info[i]); +- if (ret) { ++ if (sst_main(auxdev, &pd_info[i])) { + /* + * This entry is not valid, hardware can partially + * populate dies. In this case MMIO will have 0xFFs. diff --git a/queue-6.10/s390-ap-refine-ap-bus-bindings-complete-processing.patch b/queue-6.10/s390-ap-refine-ap-bus-bindings-complete-processing.patch new file mode 100644 index 00000000000..fd131398c15 --- /dev/null +++ b/queue-6.10/s390-ap-refine-ap-bus-bindings-complete-processing.patch @@ -0,0 +1,60 @@ +From b4f5bd60d558f6ba451d7e76aa05782c07a182a3 Mon Sep 17 00:00:00 2001 +From: Harald Freudenberger +Date: Tue, 6 Aug 2024 12:06:23 +0200 +Subject: s390/ap: Refine AP bus bindings complete processing + +From: Harald Freudenberger + +commit b4f5bd60d558f6ba451d7e76aa05782c07a182a3 upstream. + +With the rework of the AP bus scan and the introduction of +a bindings complete completion also the timing until the +userspace finally receives a AP bus binding complete uevent +had increased. Unfortunately this event triggers some important +jobs for preparation of KVM guests, for example the modification +of card/queue masks to reassign AP resources to the alternate +AP queue device driver (vfio_ap) which is the precondition +for building mediated devices which may be a precondition for +starting KVM guests using AP resources. + +This small fix now triggers the check for binding complete +each time an AP device driver has registered. With this patch +the bindings complete may be posted up to 30s earlier as there +is no need to wait for the next AP bus scan any more. + +Fixes: 778412ab915d ("s390/ap: rearm APQNs bindings complete completion") +Signed-off-by: Harald Freudenberger +Reviewed-by: Holger Dengler +Cc: stable@vger.kernel.org +Acked-by: Alexander Gordeev +Signed-off-by: Vasily Gorbik +Signed-off-by: Greg Kroah-Hartman +--- + drivers/s390/crypto/ap_bus.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c +index 0998b17ecb37..f9f682f19415 100644 +--- a/drivers/s390/crypto/ap_bus.c ++++ b/drivers/s390/crypto/ap_bus.c +@@ -971,11 +971,16 @@ int ap_driver_register(struct ap_driver *ap_drv, struct module *owner, + char *name) + { + struct device_driver *drv = &ap_drv->driver; ++ int rc; + + drv->bus = &ap_bus_type; + drv->owner = owner; + drv->name = name; +- return driver_register(drv); ++ rc = driver_register(drv); ++ ++ ap_check_bindings_complete(); ++ ++ return rc; + } + EXPORT_SYMBOL(ap_driver_register); + +-- +2.46.0 + diff --git a/queue-6.10/scsi-core-fix-the-return-value-of-scsi_logical_block_count.patch b/queue-6.10/scsi-core-fix-the-return-value-of-scsi_logical_block_count.patch new file mode 100644 index 00000000000..ede5b972835 --- /dev/null +++ b/queue-6.10/scsi-core-fix-the-return-value-of-scsi_logical_block_count.patch @@ -0,0 +1,36 @@ +From f03e94f23b04c2b71c0044c1534921b3975ef10c Mon Sep 17 00:00:00 2001 +From: Chaotian Jing +Date: Tue, 13 Aug 2024 13:34:10 +0800 +Subject: scsi: core: Fix the return value of scsi_logical_block_count() + +From: Chaotian Jing + +commit f03e94f23b04c2b71c0044c1534921b3975ef10c upstream. + +scsi_logical_block_count() should return the block count of a given SCSI +command. The original implementation ended up shifting twice, leading to an +incorrect count being returned. Fix the conversion between bytes and +logical blocks. + +Cc: stable@vger.kernel.org +Fixes: 6a20e21ae1e2 ("scsi: core: Add helper to return number of logical blocks in a request") +Signed-off-by: Chaotian Jing +Link: https://lore.kernel.org/r/20240813053534.7720-1-chaotian.jing@mediatek.com +Reviewed-by: Bart Van Assche +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + include/scsi/scsi_cmnd.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/scsi/scsi_cmnd.h ++++ b/include/scsi/scsi_cmnd.h +@@ -234,7 +234,7 @@ static inline sector_t scsi_get_lba(stru + + static inline unsigned int scsi_logical_block_count(struct scsi_cmnd *scmd) + { +- unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; ++ unsigned int shift = ilog2(scmd->device->sector_size); + + return blk_rq_bytes(scsi_cmd_to_rq(scmd)) >> shift; + } diff --git a/queue-6.10/series b/queue-6.10/series index 4078049afa0..482dc4862e9 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -221,3 +221,14 @@ s390-boot-fix-kaslr-base-offset-off-by-__start_kerne.patch smb-client-ignore-unhandled-reparse-tags.patch nvme-move-stopping-keep-alive-into-nvme_uninit_ctrl.patch bluetooth-mgmt-add-error-handling-to-pair_device.patch +scsi-core-fix-the-return-value-of-scsi_logical_block_count.patch +ksmbd-the-buffer-of-smb2-query-dir-response-has-at-least-1-byte.patch +drm-amdgpu-validate-ta-binary-size.patch +drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.1.patch +platform-x86-dell-uart-backlight-use-acpi_video_get_backlight_type.patch +platform-x86-isst-fix-return-value-on-last-invalid-resource.patch +s390-ap-refine-ap-bus-bindings-complete-processing.patch +net-ngbe-fix-phy-mode-set-to-external-phy.patch +net-dsa-microchip-fix-ptp-config-failure-when-using-multiple-ports.patch +mips-loongson64-set-timer-mode-in-cpu-probe.patch +hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch