From: Greg Kroah-Hartman Date: Sun, 16 Mar 2025 07:56:05 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v6.6.84~34^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fddd953d6886ffc265e46e695f10b8486daa976;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch drm-amd-display-restore-correct-backlight-brightness-after-a-gpu-reset.patch drm-atomic-filter-out-redundant-dpms-calls.patch drm-dp_mst-fix-locking-when-skipping-csn-before-topology-probing.patch input-i8042-add-required-quirks-for-missing-old-boardnames.patch input-i8042-swap-old-quirk-combination-with-new-quirk-for-more-devices.patch input-i8042-swap-old-quirk-combination-with-new-quirk-for-nhxxrzq.patch input-i8042-swap-old-quirk-combination-with-new-quirk-for-several-devices.patch qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch usb-serial-ftdi_sio-add-support-for-altera-usb-blaster-3.patch usb-serial-option-add-telit-cinterion-fe990b-compositions.patch usb-serial-option-fix-telit-cinterion-fe990a-name.patch usb-serial-option-match-on-interface-class-for-telit-fn990b.patch x86-microcode-amd-fix-out-of-bounds-on-systems-with-cpu-less-numa-nodes.patch --- diff --git a/queue-6.1/asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch b/queue-6.1/asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch new file mode 100644 index 0000000000..313ab28581 --- /dev/null +++ b/queue-6.1/asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch @@ -0,0 +1,45 @@ +From 0704a15b930cf97073ce091a0cd7ad32f2304329 Mon Sep 17 00:00:00 2001 +From: Thomas Mizrahi +Date: Sat, 8 Mar 2025 01:06:28 -0300 +Subject: ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model + +From: Thomas Mizrahi + +commit 0704a15b930cf97073ce091a0cd7ad32f2304329 upstream. + +The internal microphone on the Lenovo ThinkPad E16 model requires a +quirk entry to work properly. This was fixed in a previous patch (linked +below), but depending on the specific variant of the model, the product +name may be "21M5" or "21M6". + +The following patch fixed this issue for the 21M5 variant: + https://lore.kernel.org/all/20240725065442.9293-1-tiwai@suse.de/ + +This patch adds support for the microphone on the 21M6 variant. + +Link: https://github.com/ramaureirac/thinkpad-e14-linux/issues/31 +Cc: stable@vger.kernel.org +Signed-off-by: Thomas Mizrahi +Link: https://patch.msgid.link/20250308041303.198765-1-thomasmizra@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -252,6 +252,13 @@ static const struct dmi_system_id yc_acp + .driver_data = &acp6x_card, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "21M6"), ++ } ++ }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "21ME"), + } + }, diff --git a/queue-6.1/clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch b/queue-6.1/clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch new file mode 100644 index 0000000000..6d9c903863 --- /dev/null +++ b/queue-6.1/clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch @@ -0,0 +1,45 @@ +From 53517a70873c7a91675f7244768aad5006cc45de Mon Sep 17 00:00:00 2001 +From: Varada Pavani +Date: Tue, 25 Feb 2025 18:49:18 +0530 +Subject: clk: samsung: update PLL locktime for PLL142XX used on FSD platform + +From: Varada Pavani + +commit 53517a70873c7a91675f7244768aad5006cc45de upstream. + +Currently PLL142XX locktime is 270. As per spec, it should be 150. Hence +update PLL142XX controller locktime to 150. + +Cc: stable@vger.kernel.org +Fixes: 4f346005aaed ("clk: samsung: fsd: Add initial clock support") +Signed-off-by: Varada Pavani +Link: https://lore.kernel.org/r/20250225131918.50925-3-v.pavani@samsung.com +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clk/samsung/clk-pll.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/clk/samsung/clk-pll.c ++++ b/drivers/clk/samsung/clk-pll.c +@@ -206,6 +206,7 @@ static const struct clk_ops samsung_pll3 + */ + /* Maximum lock time can be 270 * PDIV cycles */ + #define PLL35XX_LOCK_FACTOR (270) ++#define PLL142XX_LOCK_FACTOR (150) + + #define PLL35XX_MDIV_MASK (0x3FF) + #define PLL35XX_PDIV_MASK (0x3F) +@@ -272,7 +273,11 @@ static int samsung_pll35xx_set_rate(stru + } + + /* Set PLL lock time. */ +- writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR, ++ if (pll->type == pll_142xx) ++ writel_relaxed(rate->pdiv * PLL142XX_LOCK_FACTOR, ++ pll->lock_reg); ++ else ++ writel_relaxed(rate->pdiv * PLL35XX_LOCK_FACTOR, + pll->lock_reg); + + /* Change PLL PMS values */ diff --git a/queue-6.1/drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch b/queue-6.1/drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch new file mode 100644 index 0000000000..a9fc28eb8c --- /dev/null +++ b/queue-6.1/drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch @@ -0,0 +1,49 @@ +From 79e31396fdd7037c503e6add15af7cb00633ea92 Mon Sep 17 00:00:00 2001 +From: Alex Hung +Date: Thu, 27 Feb 2025 16:36:25 -0700 +Subject: drm/amd/display: Assign normalized_pix_clk when color depth = 14 + +From: Alex Hung + +commit 79e31396fdd7037c503e6add15af7cb00633ea92 upstream. + +[WHY & HOW] +A warning message "WARNING: CPU: 4 PID: 459 at ... /dc_resource.c:3397 +calculate_phy_pix_clks+0xef/0x100 [amdgpu]" occurs because the +display_color_depth == COLOR_DEPTH_141414 is not handled. This is +observed in Radeon RX 6600 XT. + +It is fixed by assigning pix_clk * (14 * 3) / 24 - same as the rests. + +Also fixes the indentation in get_norm_pix_clk. + +Reviewed-by: Harry Wentland +Signed-off-by: Alex Hung +Signed-off-by: Tom Chung +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +(cherry picked from commit 274a87eb389f58eddcbc5659ab0b180b37e92775) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -2328,10 +2328,13 @@ static int get_norm_pix_clk(const struct + break; + case COLOR_DEPTH_121212: + normalized_pix_clk = (pix_clk * 36) / 24; +- break; ++ break; ++ case COLOR_DEPTH_141414: ++ normalized_pix_clk = (pix_clk * 42) / 24; ++ break; + case COLOR_DEPTH_161616: + normalized_pix_clk = (pix_clk * 48) / 24; +- break; ++ break; + default: + ASSERT(0); + break; diff --git a/queue-6.1/drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch b/queue-6.1/drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch new file mode 100644 index 0000000000..b837d869ed --- /dev/null +++ b/queue-6.1/drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch @@ -0,0 +1,41 @@ +From e65e7bea220c3ce8c4c793b4ba35557f4994ab2b Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Fri, 28 Feb 2025 13:18:14 -0600 +Subject: drm/amd/display: Fix slab-use-after-free on hdcp_work + +From: Mario Limonciello + +commit e65e7bea220c3ce8c4c793b4ba35557f4994ab2b upstream. + +[Why] +A slab-use-after-free is reported when HDCP is destroyed but the +property_validate_dwork queue is still running. + +[How] +Cancel the delayed work when destroying workqueue. + +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006 +Fixes: da3fd7ac0bcf ("drm/amd/display: Update CP property based on HW query") +Cc: Alex Deucher +Reviewed-by: Alex Hung +Signed-off-by: Mario Limonciello +Signed-off-by: Tom Chung +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +(cherry picked from commit 725a04ba5a95e89c89633d4322430cfbca7ce128) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +@@ -404,6 +404,7 @@ void hdcp_destroy(struct kobject *kobj, + for (i = 0; i < hdcp_work->max_link; i++) { + cancel_delayed_work_sync(&hdcp_work[i].callback_dwork); + cancel_delayed_work_sync(&hdcp_work[i].watchdog_timer_dwork); ++ cancel_delayed_work_sync(&hdcp_work[i].property_validate_dwork); + } + + sysfs_remove_bin_file(kobj, &hdcp_work[0].attr); diff --git a/queue-6.1/drm-amd-display-restore-correct-backlight-brightness-after-a-gpu-reset.patch b/queue-6.1/drm-amd-display-restore-correct-backlight-brightness-after-a-gpu-reset.patch new file mode 100644 index 0000000000..5d81d0bbe6 --- /dev/null +++ b/queue-6.1/drm-amd-display-restore-correct-backlight-brightness-after-a-gpu-reset.patch @@ -0,0 +1,56 @@ +From 5760388d9681ac743038b846b9082b9023969551 Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Sun, 23 Feb 2025 00:04:35 -0600 +Subject: drm/amd/display: Restore correct backlight brightness after a GPU reset + +From: Mario Limonciello + +commit 5760388d9681ac743038b846b9082b9023969551 upstream. + +[Why] +GPU reset will attempt to restore cached state, but brightness doesn't +get restored. It will come back at 100% brightness, but userspace thinks +it's the previous value. + +[How] +When running resume sequence if GPU is in reset restore brightness +to previous value. + +Acked-by: Wayne Lin +Signed-off-by: Mario Limonciello +Signed-off-by: Tom Chung +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +(cherry picked from commit 5e19e2b57b6bb640d68dfc7991e1e182922cf867) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -230,6 +230,10 @@ static int amdgpu_dm_atomic_check(struct + static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector); + static void handle_hpd_rx_irq(void *param); + ++static void amdgpu_dm_backlight_set_level(struct amdgpu_display_manager *dm, ++ int bl_idx, ++ u32 user_brightness); ++ + static bool + is_timing_unchanged_for_freesync(struct drm_crtc_state *old_crtc_state, + struct drm_crtc_state *new_crtc_state); +@@ -2885,6 +2889,12 @@ static int dm_resume(void *handle) + + mutex_unlock(&dm->dc_lock); + ++ /* set the backlight after a reset */ ++ for (i = 0; i < dm->num_of_edps; i++) { ++ if (dm->backlight_dev[i]) ++ amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]); ++ } ++ + return 0; + } + /* Recreate dc_state - DC invalidates it when setting power state to S3. */ diff --git a/queue-6.1/drm-atomic-filter-out-redundant-dpms-calls.patch b/queue-6.1/drm-atomic-filter-out-redundant-dpms-calls.patch new file mode 100644 index 0000000000..1800f898b6 --- /dev/null +++ b/queue-6.1/drm-atomic-filter-out-redundant-dpms-calls.patch @@ -0,0 +1,63 @@ +From de93ddf88088f7624b589d0ff3af9effb87e8f3b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Wed, 19 Feb 2025 18:02:39 +0200 +Subject: drm/atomic: Filter out redundant DPMS calls +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit de93ddf88088f7624b589d0ff3af9effb87e8f3b upstream. + +Video players (eg. mpv) do periodic XResetScreenSaver() calls to +keep the screen on while the video playing. The modesetting ddx +plumbs these straight through into the kernel as DPMS setproperty +ioctls, without any filtering whatsoever. When implemented via +atomic these end up as empty commits on the crtc (which will +nonetheless take one full frame), which leads to a dropped +frame every time XResetScreenSaver() is called. + +Let's just filter out redundant DPMS property changes in the +kernel to avoid this issue. + +v2: Explain the resulting commits a bit better (Sima) + Document the behaviour in uapi docs (Sima) + +Cc: stable@vger.kernel.org +Testcase: igt/kms_flip/flip-vs-dpms-on-nop +Reviewed-by: Simona Vetter +Signed-off-by: Ville Syrjälä +Link: https://patchwork.freedesktop.org/patch/msgid/20250219160239.17502-1-ville.syrjala@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_atomic_uapi.c | 4 ++++ + drivers/gpu/drm/drm_connector.c | 4 ++++ + 2 files changed, 8 insertions(+) + +--- a/drivers/gpu/drm/drm_atomic_uapi.c ++++ b/drivers/gpu/drm/drm_atomic_uapi.c +@@ -932,6 +932,10 @@ int drm_atomic_connector_commit_dpms(str + + if (mode != DRM_MODE_DPMS_ON) + mode = DRM_MODE_DPMS_OFF; ++ ++ if (connector->dpms == mode) ++ goto out; ++ + connector->dpms = mode; + + crtc = connector->state->crtc; +--- a/drivers/gpu/drm/drm_connector.c ++++ b/drivers/gpu/drm/drm_connector.c +@@ -1100,6 +1100,10 @@ static const struct drm_prop_enum_list d + * callback. For atomic drivers the remapping to the "ACTIVE" property is + * implemented in the DRM core. + * ++ * On atomic drivers any DPMS setproperty ioctl where the value does not ++ * change is completely skipped, otherwise a full atomic commit will occur. ++ * On legacy drivers the exact behavior is driver specific. ++ * + * Note that this property cannot be set through the MODE_ATOMIC ioctl, + * userspace must use "ACTIVE" on the CRTC instead. + * diff --git a/queue-6.1/drm-dp_mst-fix-locking-when-skipping-csn-before-topology-probing.patch b/queue-6.1/drm-dp_mst-fix-locking-when-skipping-csn-before-topology-probing.patch new file mode 100644 index 0000000000..3790d1305d --- /dev/null +++ b/queue-6.1/drm-dp_mst-fix-locking-when-skipping-csn-before-topology-probing.patch @@ -0,0 +1,124 @@ +From 12d8f318347b1d4feac48e8ac351d3786af39599 Mon Sep 17 00:00:00 2001 +From: Imre Deak +Date: Fri, 7 Mar 2025 20:31:52 +0200 +Subject: drm/dp_mst: Fix locking when skipping CSN before topology probing + +From: Imre Deak + +commit 12d8f318347b1d4feac48e8ac351d3786af39599 upstream. + +The handling of the MST Connection Status Notify message is skipped if +the probing of the topology is still pending. Acquiring the +drm_dp_mst_topology_mgr::probe_lock for this in +drm_dp_mst_handle_up_req() is problematic: the task/work this function +is called from is also responsible for handling MST down-request replies +(in drm_dp_mst_handle_down_rep()). Thus drm_dp_mst_link_probe_work() - +holding already probe_lock - could be blocked waiting for an MST +down-request reply while drm_dp_mst_handle_up_req() is waiting for +probe_lock while processing a CSN message. This leads to the probe +work's down-request message timing out. + +A scenario similar to the above leading to a down-request timeout is +handling a CSN message in drm_dp_mst_handle_conn_stat(), holding the +probe_lock and sending down-request messages while a second CSN message +sent by the sink subsequently is handled by drm_dp_mst_handle_up_req(). + +Fix the above by moving the logic to skip the CSN handling to +drm_dp_mst_process_up_req(). This function is called from a work +(separate from the task/work handling new up/down messages), already +holding probe_lock. This solves the above timeout issue, since handling +of down-request replies won't be blocked by probe_lock. + +Fixes: ddf983488c3e ("drm/dp_mst: Skip CSN if topology probing is not done yet") +Cc: Wayne Lin +Cc: Lyude Paul +Cc: stable@vger.kernel.org # v6.6+ +Reviewed-by: Wayne Lin +Reviewed-by: Lyude Paul +Signed-off-by: Imre Deak +Link: https://patchwork.freedesktop.org/patch/msgid/20250307183152.3822170-1-imre.deak@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/display/drm_dp_mst_topology.c | 40 +++++++++++++++----------- + 1 file changed, 24 insertions(+), 16 deletions(-) + +--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c ++++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c +@@ -3959,6 +3959,22 @@ out: + return 0; + } + ++static bool primary_mstb_probing_is_done(struct drm_dp_mst_topology_mgr *mgr) ++{ ++ bool probing_done = false; ++ ++ mutex_lock(&mgr->lock); ++ ++ if (mgr->mst_primary && drm_dp_mst_topology_try_get_mstb(mgr->mst_primary)) { ++ probing_done = mgr->mst_primary->link_address_sent; ++ drm_dp_mst_topology_put_mstb(mgr->mst_primary); ++ } ++ ++ mutex_unlock(&mgr->lock); ++ ++ return probing_done; ++} ++ + static inline bool + drm_dp_mst_process_up_req(struct drm_dp_mst_topology_mgr *mgr, + struct drm_dp_pending_up_req *up_req) +@@ -3989,8 +4005,12 @@ drm_dp_mst_process_up_req(struct drm_dp_ + + /* TODO: Add missing handler for DP_RESOURCE_STATUS_NOTIFY events */ + if (msg->req_type == DP_CONNECTION_STATUS_NOTIFY) { +- dowork = drm_dp_mst_handle_conn_stat(mstb, &msg->u.conn_stat); +- hotplug = true; ++ if (!primary_mstb_probing_is_done(mgr)) { ++ drm_dbg_kms(mgr->dev, "Got CSN before finish topology probing. Skip it.\n"); ++ } else { ++ dowork = drm_dp_mst_handle_conn_stat(mstb, &msg->u.conn_stat); ++ hotplug = true; ++ } + } + + drm_dp_mst_topology_put_mstb(mstb); +@@ -4069,10 +4089,11 @@ static int drm_dp_mst_handle_up_req(stru + drm_dp_send_up_ack_reply(mgr, mst_primary, up_req->msg.req_type, + false); + ++ drm_dp_mst_topology_put_mstb(mst_primary); ++ + if (up_req->msg.req_type == DP_CONNECTION_STATUS_NOTIFY) { + const struct drm_dp_connection_status_notify *conn_stat = + &up_req->msg.u.conn_stat; +- bool handle_csn; + + drm_dbg_kms(mgr->dev, "Got CSN: pn: %d ldps:%d ddps: %d mcs: %d ip: %d pdt: %d\n", + conn_stat->port_number, +@@ -4081,16 +4102,6 @@ static int drm_dp_mst_handle_up_req(stru + conn_stat->message_capability_status, + conn_stat->input_port, + conn_stat->peer_device_type); +- +- mutex_lock(&mgr->probe_lock); +- handle_csn = mst_primary->link_address_sent; +- mutex_unlock(&mgr->probe_lock); +- +- if (!handle_csn) { +- drm_dbg_kms(mgr->dev, "Got CSN before finish topology probing. Skip it."); +- kfree(up_req); +- goto out_put_primary; +- } + } else if (up_req->msg.req_type == DP_RESOURCE_STATUS_NOTIFY) { + const struct drm_dp_resource_status_notify *res_stat = + &up_req->msg.u.resource_stat; +@@ -4105,9 +4116,6 @@ static int drm_dp_mst_handle_up_req(stru + list_add_tail(&up_req->next, &mgr->up_req_list); + mutex_unlock(&mgr->up_req_lock); + queue_work(system_long_wq, &mgr->up_req_work); +- +-out_put_primary: +- drm_dp_mst_topology_put_mstb(mst_primary); + out_clear_reply: + memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); + return 0; diff --git a/queue-6.1/input-i8042-add-required-quirks-for-missing-old-boardnames.patch b/queue-6.1/input-i8042-add-required-quirks-for-missing-old-boardnames.patch new file mode 100644 index 0000000000..462897b245 --- /dev/null +++ b/queue-6.1/input-i8042-add-required-quirks-for-missing-old-boardnames.patch @@ -0,0 +1,77 @@ +From 9ed468e17d5b80e7116fd35842df3648e808ae47 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Sat, 22 Feb 2025 00:01:23 +0100 +Subject: Input: i8042 - add required quirks for missing old boardnames + +From: Werner Sembach + +commit 9ed468e17d5b80e7116fd35842df3648e808ae47 upstream. + +Some older Clevo barebones have problems like no or laggy keyboard after +resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE +quirk. + +The PB71RD keyboard is sometimes laggy after resume and the PC70DR, PB51RF, +P640RE, and PCX0DX_GN20 keyboard is sometimes unresponsive after resume. +This quirk fixes that. + +Cc: stable@vger.kernel.org +Signed-off-by: Werner Sembach +Link: https://lore.kernel.org/r/20250221230137.70292-2-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1261,6 +1261,12 @@ static const struct dmi_system_id i8042_ + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, + { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "P640RE"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) ++ }, ++ { + /* + * This is only a partial board_name and might be followed by + * another letter or number. DMI_MATCH however does do partial +@@ -1337,11 +1343,35 @@ static const struct dmi_system_id i8042_ + }, + { + .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "PB51RF"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "PB71RD"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "PC70DR"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) ++ }, ++ { ++ .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PCX0DX"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "PCX0DX_GN20"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) ++ }, + /* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */ + { + .matches = { diff --git a/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-more-devices.patch b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-more-devices.patch new file mode 100644 index 0000000000..24b6e2aa66 --- /dev/null +++ b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-more-devices.patch @@ -0,0 +1,125 @@ +From d85862ccca452eeb19329e9f4f9a6ce1d1e53561 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Sat, 22 Feb 2025 00:01:25 +0100 +Subject: Input: i8042 - swap old quirk combination with new quirk for more devices + +From: Werner Sembach + +commit d85862ccca452eeb19329e9f4f9a6ce1d1e53561 upstream. + +Some older Clevo barebones have problems like no or laggy keyboard after +resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE +quirk. + +We could not activly retest these devices because we no longer have them in +our archive, but based on the other old Clevo barebones we tested where the +new quirk had the same or a better behaviour I think it would be good to +apply it on these too. + +Cc: stable@vger.kernel.org +Signed-off-by: Werner Sembach +Link: https://lore.kernel.org/r/20250221230137.70292-4-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 31 ++++++++++--------------------- + 1 file changed, 10 insertions(+), 21 deletions(-) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1157,9 +1157,7 @@ static const struct dmi_system_id i8042_ + }, + /* + * A lot of modern Clevo barebones have touchpad and/or keyboard issues +- * after suspend fixable with nomux + reset + noloop + nopnp. Luckily, +- * none of them have an external PS/2 port so this can safely be set for +- * all of them. ++ * after suspend fixable with the forcenorestore quirk. + * Clevo barebones come with board_vendor and/or system_vendor set to + * either the very generic string "Notebook" and/or a different value + * for each individual reseller. The only somewhat universal way to +@@ -1175,22 +1173,19 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "LAPQC71B"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "N140CU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "N141CU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1250,8 +1245,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NJ50_70CU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1268,16 +1262,14 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P65xH"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P65xRP"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* +@@ -1288,8 +1280,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P65_P67H"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* +@@ -1300,8 +1291,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RP"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* +@@ -1323,8 +1313,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P67xRP"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { diff --git a/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-nhxxrzq.patch b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-nhxxrzq.patch new file mode 100644 index 0000000000..84333fefb1 --- /dev/null +++ b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-nhxxrzq.patch @@ -0,0 +1,47 @@ +From 729d163232971672d0f41b93c02092fb91f0e758 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Sat, 22 Feb 2025 00:01:22 +0100 +Subject: Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ + +From: Werner Sembach + +commit 729d163232971672d0f41b93c02092fb91f0e758 upstream. + +Some older Clevo barebones have problems like no or laggy keyboard after +resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE +quirk. + +With the old i8042 quirks this devices keyboard is sometimes laggy after +resume. With the new quirk this issue doesn't happen. + +Cc: stable@vger.kernel.org +Signed-off-by: Werner Sembach +Link: https://lore.kernel.org/r/20250221230137.70292-1-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1209,18 +1209,10 @@ static const struct dmi_system_id i8042_ + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, + { +- /* +- * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes +- * the keyboard very laggy for ~5 seconds after boot and +- * sometimes also after resume. +- * However both are required for the keyboard to not fail +- * completely sometimes after boot or resume. +- */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { diff --git a/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-several-devices.patch b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-several-devices.patch new file mode 100644 index 0000000000..d8158cb71a --- /dev/null +++ b/queue-6.1/input-i8042-swap-old-quirk-combination-with-new-quirk-for-several-devices.patch @@ -0,0 +1,147 @@ +From 75ee4ebebbbe8dc4b55ba37f388924fa96bf1564 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Sat, 22 Feb 2025 00:01:24 +0100 +Subject: Input: i8042 - swap old quirk combination with new quirk for several devices + +From: Werner Sembach + +commit 75ee4ebebbbe8dc4b55ba37f388924fa96bf1564 upstream. + +Some older Clevo barebones have problems like no or laggy keyboard after +resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE +quirk. + +While the old quirk combination did not show negative effects on these +devices specifically, the new quirk works just as well and seems more +stable in general. + +Cc: stable@vger.kernel.org +Signed-off-by: Werner Sembach +Link: https://lore.kernel.org/r/20250221230137.70292-3-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 40 +++++++++++----------------------- + 1 file changed, 14 insertions(+), 26 deletions(-) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1080,16 +1080,14 @@ static const struct dmi_system_id i8042_ + DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"), + DMI_MATCH(DMI_BOARD_NAME, "AURA1501"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"), + DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* Mivvy M310 */ +@@ -1171,8 +1169,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "LAPQC71A"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1205,8 +1202,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1218,8 +1214,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + /* + * At least one modern Clevo barebone has the touchpad connected both +@@ -1235,17 +1230,15 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NS50MU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX | +- SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | +- SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_NOAUX | ++ SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "NS50_70MU"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX | +- SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | +- SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_NOAUX | ++ SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1319,8 +1312,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RS"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* +@@ -1338,8 +1330,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PB50_70DFx,DDx"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1363,8 +1354,7 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PCX0DX"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { +@@ -1383,15 +1373,13 @@ static const struct dmi_system_id i8042_ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "X170SM"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "X170KM-G"), + }, +- .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | +- SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ .driver_data = (void *)(SERIO_QUIRK_FORCENORESTORE) + }, + { + /* diff --git a/queue-6.1/qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch b/queue-6.1/qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch new file mode 100644 index 0000000000..37b933128d --- /dev/null +++ b/queue-6.1/qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch @@ -0,0 +1,51 @@ +From d2b9d97e89c79c95f8b517e4fa43fd100f936acc Mon Sep 17 00:00:00 2001 +From: Haoxiang Li +Date: Fri, 7 Mar 2025 17:49:52 +0800 +Subject: qlcnic: fix memory leak issues in qlcnic_sriov_common.c + +From: Haoxiang Li + +commit d2b9d97e89c79c95f8b517e4fa43fd100f936acc upstream. + +Add qlcnic_sriov_free_vlans() in qlcnic_sriov_alloc_vlans() if +any sriov_vlans fails to be allocated. +Add qlcnic_sriov_free_vlans() to free the memory allocated by +qlcnic_sriov_alloc_vlans() if "sriov->allowed_vlans" fails to +be allocated. + +Fixes: 91b7282b613d ("qlcnic: Support VLAN id config.") +Cc: stable@vger.kernel.org +Signed-off-by: Haoxiang Li +Link: https://patch.msgid.link/20250307094952.14874-1-haoxiang_li2024@163.com +Signed-off-by: Paolo Abeni +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +@@ -454,8 +454,10 @@ static int qlcnic_sriov_set_guest_vlan_m + + num_vlans = sriov->num_allowed_vlans; + sriov->allowed_vlans = kcalloc(num_vlans, sizeof(u16), GFP_KERNEL); +- if (!sriov->allowed_vlans) ++ if (!sriov->allowed_vlans) { ++ qlcnic_sriov_free_vlans(adapter); + return -ENOMEM; ++ } + + vlans = (u16 *)&cmd->rsp.arg[3]; + for (i = 0; i < num_vlans; i++) +@@ -2167,8 +2169,10 @@ int qlcnic_sriov_alloc_vlans(struct qlcn + vf = &sriov->vf_info[i]; + vf->sriov_vlans = kcalloc(sriov->num_allowed_vlans, + sizeof(*vf->sriov_vlans), GFP_KERNEL); +- if (!vf->sriov_vlans) ++ if (!vf->sriov_vlans) { ++ qlcnic_sriov_free_vlans(adapter); + return -ENOMEM; ++ } + } + + return 0; diff --git a/queue-6.1/series b/queue-6.1/series index a7184c9329..1a13f0efe1 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -104,3 +104,20 @@ xfs-ensure-logflagsp-is-initialized-in-xfs_bmap_del_extent_real.patch xfs-update-dir3-leaf-block-metadata-after-swap.patch xfs-reset-xfs_attr_incomplete-filter-on-node-removal.patch xfs-remove-conditional-building-of-rt-geometry-validator-functions.patch +input-i8042-swap-old-quirk-combination-with-new-quirk-for-nhxxrzq.patch +input-i8042-add-required-quirks-for-missing-old-boardnames.patch +input-i8042-swap-old-quirk-combination-with-new-quirk-for-several-devices.patch +input-i8042-swap-old-quirk-combination-with-new-quirk-for-more-devices.patch +usb-serial-ftdi_sio-add-support-for-altera-usb-blaster-3.patch +usb-serial-option-add-telit-cinterion-fe990b-compositions.patch +usb-serial-option-fix-telit-cinterion-fe990a-name.patch +usb-serial-option-match-on-interface-class-for-telit-fn990b.patch +x86-microcode-amd-fix-out-of-bounds-on-systems-with-cpu-less-numa-nodes.patch +drm-atomic-filter-out-redundant-dpms-calls.patch +drm-dp_mst-fix-locking-when-skipping-csn-before-topology-probing.patch +drm-amd-display-restore-correct-backlight-brightness-after-a-gpu-reset.patch +drm-amd-display-assign-normalized_pix_clk-when-color-depth-14.patch +drm-amd-display-fix-slab-use-after-free-on-hdcp_work.patch +clk-samsung-update-pll-locktime-for-pll142xx-used-on-fsd-platform.patch +asoc-amd-yc-support-mic-on-another-lenovo-thinkpad-e16-gen-2-model.patch +qlcnic-fix-memory-leak-issues-in-qlcnic_sriov_common.c.patch diff --git a/queue-6.1/usb-serial-ftdi_sio-add-support-for-altera-usb-blaster-3.patch b/queue-6.1/usb-serial-ftdi_sio-add-support-for-altera-usb-blaster-3.patch new file mode 100644 index 0000000000..20d3e2c0a6 --- /dev/null +++ b/queue-6.1/usb-serial-ftdi_sio-add-support-for-altera-usb-blaster-3.patch @@ -0,0 +1,88 @@ +From 18e0885bd2ca738407036434418a26a58394a60e Mon Sep 17 00:00:00 2001 +From: Boon Khai Ng +Date: Wed, 12 Mar 2025 11:05:44 +0800 +Subject: USB: serial: ftdi_sio: add support for Altera USB Blaster 3 + +From: Boon Khai Ng + +commit 18e0885bd2ca738407036434418a26a58394a60e upstream. + +The Altera USB Blaster 3, available as both a cable and an on-board +solution, is primarily used for programming and debugging FPGAs. + +It interfaces with host software such as Quartus Programmer, +System Console, SignalTap, and Nios Debugger. The device utilizes +either an FT2232 or FT4232 chip. + +Enabling the support for various configurations of the on-board +USB Blaster 3 by including the appropriate VID/PID pairs, +allowing it to function as a serial device via ftdi_sio. + +Note that this check-in does not include support for the +cable solution, as it does not support UART functionality. +The supported configurations are determined by the +hardware design and include: + +1) PID 0x6022, FT2232, 1 JTAG port (Port A) + Port B as UART +2) PID 0x6025, FT4232, 1 JTAG port (Port A) + Port C as UART +3) PID 0x6026, FT4232, 1 JTAG port (Port A) + Port C, D as UART +4) PID 0x6029, FT4232, 1 JTAG port (Port B) + Port C as UART +5) PID 0x602a, FT4232, 1 JTAG port (Port B) + Port C, D as UART +6) PID 0x602c, FT4232, 1 JTAG port (Port A) + Port B as UART +7) PID 0x602d, FT4232, 1 JTAG port (Port A) + Port B, C as UART +8) PID 0x602e, FT4232, 1 JTAG port (Port A) + Port B, C, D as UART + +These configurations allow for flexibility in how the USB Blaster 3 is +used, depending on the specific needs of the hardware design. + +Signed-off-by: Boon Khai Ng +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/ftdi_sio.c | 14 ++++++++++++++ + drivers/usb/serial/ftdi_sio_ids.h | 13 +++++++++++++ + 2 files changed, 27 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1079,6 +1079,20 @@ static const struct usb_device_id id_tab + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + /* GMC devices */ + { USB_DEVICE(GMC_VID, GMC_Z216C_PID) }, ++ /* Altera USB Blaster 3 */ ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6022_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6025_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 3) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6029_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 3) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602C_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) }, ++ { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) }, + { } /* Terminating entry */ + }; + +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -1612,3 +1612,16 @@ + */ + #define GMC_VID 0x1cd7 + #define GMC_Z216C_PID 0x0217 /* GMC Z216C Adapter IR-USB */ ++ ++/* ++ * Altera USB Blaster 3 (http://www.altera.com). ++ */ ++#define ALTERA_VID 0x09fb ++#define ALTERA_UB3_6022_PID 0x6022 ++#define ALTERA_UB3_6025_PID 0x6025 ++#define ALTERA_UB3_6026_PID 0x6026 ++#define ALTERA_UB3_6029_PID 0x6029 ++#define ALTERA_UB3_602A_PID 0x602a ++#define ALTERA_UB3_602C_PID 0x602c ++#define ALTERA_UB3_602D_PID 0x602d ++#define ALTERA_UB3_602E_PID 0x602e diff --git a/queue-6.1/usb-serial-option-add-telit-cinterion-fe990b-compositions.patch b/queue-6.1/usb-serial-option-add-telit-cinterion-fe990b-compositions.patch new file mode 100644 index 0000000000..c451fa3657 --- /dev/null +++ b/queue-6.1/usb-serial-option-add-telit-cinterion-fe990b-compositions.patch @@ -0,0 +1,209 @@ +From 4981bb50392b7515b765da28cf8768ce624c2670 Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Tue, 4 Mar 2025 10:19:38 +0100 +Subject: USB: serial: option: add Telit Cinterion FE990B compositions + +From: Fabio Porcedda + +commit 4981bb50392b7515b765da28cf8768ce624c2670 upstream. + +Add the following Telit Cinterion FE990B40 compositions: + +0x10b0: rmnet + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb +T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10b0 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE990 +S: SerialNumber=28c2595e +C: #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) +E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +0x10b1: MBIM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb +T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10b1 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE990 +S: SerialNumber=28c2595e +C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim +E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) +E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +0x10b2: RNDIS + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb +T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 9 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10b2 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE990 +S: SerialNumber=28c2595e +C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host +E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) +E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +0x10b3: ECM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + + tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb +T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 11 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10b3 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE990 +S: SerialNumber=28c2595e +C: #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether +E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) +E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Cc: stable@vger.kernel.org +Signed-off-by: Fabio Porcedda +Reviewed-by: Daniele Palmas +[ johan: use USB_DEVICE_AND_INTERFACE_INFO() and sort by protocol ] +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1388,6 +1388,22 @@ static const struct usb_device_id option + .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */ + .driver_info = NCTRL(3) | RSVD(4) | RSVD(5) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x30), /* Telit FE990B (rmnet) */ ++ .driver_info = NCTRL(5) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x30), /* Telit FE990B (MBIM) */ ++ .driver_info = NCTRL(6) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x30), /* Telit FE990B (RNDIS) */ ++ .driver_info = NCTRL(6) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x30), /* Telit FE990B (ECM) */ ++ .driver_info = NCTRL(6) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x60) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c0, 0xff), /* Telit FE910C04 (rmnet) */ + .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c4, 0xff), /* Telit FE910C04 (rmnet) */ diff --git a/queue-6.1/usb-serial-option-fix-telit-cinterion-fe990a-name.patch b/queue-6.1/usb-serial-option-fix-telit-cinterion-fe990a-name.patch new file mode 100644 index 0000000000..9329dcc1cd --- /dev/null +++ b/queue-6.1/usb-serial-option-fix-telit-cinterion-fe990a-name.patch @@ -0,0 +1,40 @@ +From 6232f0d8e100a26275bbd773fc56a60af2c95322 Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Tue, 4 Mar 2025 10:19:39 +0100 +Subject: USB: serial: option: fix Telit Cinterion FE990A name + +From: Fabio Porcedda + +commit 6232f0d8e100a26275bbd773fc56a60af2c95322 upstream. + +The correct name for FE990 is FE990A so use it in order to avoid +confusion with FE990B. + +Cc: stable@vger.kernel.org +Signed-off-by: Fabio Porcedda +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1368,13 +1368,13 @@ static const struct usb_device_id option + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ + .driver_info = RSVD(0) }, +- { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990 (rmnet) */ ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990A (rmnet) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, +- { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990 (MBIM) */ ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990A (MBIM) */ + .driver_info = NCTRL(0) | RSVD(1) }, +- { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff), /* Telit FE990 (RNDIS) */ ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff), /* Telit FE990A (RNDIS) */ + .driver_info = NCTRL(2) | RSVD(3) }, +- { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff), /* Telit FE990 (ECM) */ ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff), /* Telit FE990A (ECM) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a0, 0xff), /* Telit FN20C04 (rmnet) */ + .driver_info = RSVD(0) | NCTRL(3) }, diff --git a/queue-6.1/usb-serial-option-match-on-interface-class-for-telit-fn990b.patch b/queue-6.1/usb-serial-option-match-on-interface-class-for-telit-fn990b.patch new file mode 100644 index 0000000000..9ffdf5cc2f --- /dev/null +++ b/queue-6.1/usb-serial-option-match-on-interface-class-for-telit-fn990b.patch @@ -0,0 +1,63 @@ +From 9a665fe3d967fe46edb4fd2497c7a5cc2dac2f55 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Thu, 6 Mar 2025 11:44:41 +0100 +Subject: USB: serial: option: match on interface class for Telit FN990B + +From: Johan Hovold + +commit 9a665fe3d967fe46edb4fd2497c7a5cc2dac2f55 upstream. + +The device id entries for Telit FN990B ended up matching only on the +interface protocol. While this works, the protocol is qualified by the +interface class (and subclass) which should have been included. + +Switch to matching using USB_DEVICE_AND_INTERFACE_INFO() while keeping +the entries sorted also by protocol for consistency. + +Link: https://lore.kernel.org/20250227110655.3647028-2-fabio.porcedda@gmail.com/ +Cc: Fabio Porcedda +Cc: Daniele Palmas +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1410,22 +1410,22 @@ static const struct usb_device_id option + .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c8, 0xff), /* Telit FE910C04 (rmnet) */ + .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x60) }, /* Telit FN990B (rmnet) */ +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x40) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x30), ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x30), /* Telit FN990B (rmnet) */ + .driver_info = NCTRL(5) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x60) }, /* Telit FN990B (MBIM) */ +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x40) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x30), ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x30), /* Telit FN990B (MBIM) */ + .driver_info = NCTRL(6) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x60) }, /* Telit FN990B (RNDIS) */ +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x40) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x30), ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x30), /* Telit FN990B (RNDIS) */ + .driver_info = NCTRL(6) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x60) }, /* Telit FN990B (ECM) */ +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x40) }, +- { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x30), ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x30), /* Telit FN990B (ECM) */ + .driver_info = NCTRL(6) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x60) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), + .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), diff --git a/queue-6.1/x86-microcode-amd-fix-out-of-bounds-on-systems-with-cpu-less-numa-nodes.patch b/queue-6.1/x86-microcode-amd-fix-out-of-bounds-on-systems-with-cpu-less-numa-nodes.patch new file mode 100644 index 0000000000..53faed0f37 --- /dev/null +++ b/queue-6.1/x86-microcode-amd-fix-out-of-bounds-on-systems-with-cpu-less-numa-nodes.patch @@ -0,0 +1,74 @@ +From e3e89178a9f4a80092578af3ff3c8478f9187d59 Mon Sep 17 00:00:00 2001 +From: Florent Revest +Date: Mon, 10 Mar 2025 15:42:43 +0100 +Subject: x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes + +From: Florent Revest + +commit e3e89178a9f4a80092578af3ff3c8478f9187d59 upstream. + +Currently, load_microcode_amd() iterates over all NUMA nodes, retrieves their +CPU masks and unconditionally accesses per-CPU data for the first CPU of each +mask. + +According to Documentation/admin-guide/mm/numaperf.rst: + + "Some memory may share the same node as a CPU, and others are provided as + memory only nodes." + +Therefore, some node CPU masks may be empty and wouldn't have a "first CPU". + +On a machine with far memory (and therefore CPU-less NUMA nodes): +- cpumask_of_node(nid) is 0 +- cpumask_first(0) is CONFIG_NR_CPUS +- cpu_data(CONFIG_NR_CPUS) accesses the cpu_info per-CPU array at an + index that is 1 out of bounds + +This does not have any security implications since flashing microcode is +a privileged operation but I believe this has reliability implications by +potentially corrupting memory while flashing a microcode update. + +When booting with CONFIG_UBSAN_BOUNDS=y on an AMD machine that flashes +a microcode update. I get the following splat: + + UBSAN: array-index-out-of-bounds in arch/x86/kernel/cpu/microcode/amd.c:X:Y + index 512 is out of range for type 'unsigned long[512]' + [...] + Call Trace: + dump_stack + __ubsan_handle_out_of_bounds + load_microcode_amd + request_microcode_amd + reload_store + kernfs_fop_write_iter + vfs_write + ksys_write + do_syscall_64 + entry_SYSCALL_64_after_hwframe + +Change the loop to go over only NUMA nodes which have CPUs before determining +whether the first CPU on the respective node needs microcode update. + + [ bp: Massage commit message, fix typo. ] + +Fixes: 7ff6edf4fef3 ("x86/microcode/AMD: Fix mixed steppings support") +Signed-off-by: Florent Revest +Signed-off-by: Borislav Petkov (AMD) +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20250310144243.861978-1-revest@chromium.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kernel/cpu/microcode/amd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/cpu/microcode/amd.c ++++ b/arch/x86/kernel/cpu/microcode/amd.c +@@ -867,7 +867,7 @@ static enum ucode_state load_microcode_a + return ret; + } + +- for_each_node(nid) { ++ for_each_node_with_cpus(nid) { + cpu = cpumask_first(cpumask_of_node(nid)); + c = &cpu_data(cpu); +