From: Greg Kroah-Hartman Date: Mon, 12 May 2025 09:15:03 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v5.15.183~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c95c3be6b042ad5c9ec601e90c9aa36455b916d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: input-mtk-pmic-keys-fix-possible-null-pointer-dereference.patch input-synaptics-enable-intertouch-on-dell-precision-m3800.patch input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch input-synaptics-enable-intertouch-on-tuxedo-infinitybook-pro-14-v5.patch input-synaptics-enable-smbus-for-hp-elitebook-850-g1.patch staging-axis-fifo-correct-handling-of-tx_fifo_depth-for-size-validation.patch staging-axis-fifo-remove-hardware-resets-for-user-errors.patch staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch --- diff --git a/queue-6.1/input-mtk-pmic-keys-fix-possible-null-pointer-dereference.patch b/queue-6.1/input-mtk-pmic-keys-fix-possible-null-pointer-dereference.patch new file mode 100644 index 0000000000..d0364d385d --- /dev/null +++ b/queue-6.1/input-mtk-pmic-keys-fix-possible-null-pointer-dereference.patch @@ -0,0 +1,40 @@ +From 11cdb506d0fbf5ac05bf55f5afcb3a215c316490 Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Tue, 29 Apr 2025 09:16:29 -0700 +Subject: Input: mtk-pmic-keys - fix possible null pointer dereference + +From: Gary Bisson + +commit 11cdb506d0fbf5ac05bf55f5afcb3a215c316490 upstream. + +In mtk_pmic_keys_probe, the regs parameter is only set if the button is +parsed in the device tree. However, on hardware where the button is left +floating, that node will most likely be removed not to enable that +input. In that case the code will try to dereference a null pointer. + +Let's use the regs struct instead as it is defined for all supported +platforms. Note that it is ok setting the key reg even if that latter is +disabled as the interrupt won't be enabled anyway. + +Fixes: b581acb49aec ("Input: mtk-pmic-keys - transfer per-key bit in mtk_pmic_keys_regs") +Signed-off-by: Gary Bisson +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/keyboard/mtk-pmic-keys.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/input/keyboard/mtk-pmic-keys.c ++++ b/drivers/input/keyboard/mtk-pmic-keys.c +@@ -133,8 +133,8 @@ static void mtk_pmic_keys_lp_reset_setup + u32 value, mask; + int error; + +- kregs_home = keys->keys[MTK_PMIC_HOMEKEY_INDEX].regs; +- kregs_pwr = keys->keys[MTK_PMIC_PWRKEY_INDEX].regs; ++ kregs_home = ®s->keys_regs[MTK_PMIC_HOMEKEY_INDEX]; ++ kregs_pwr = ®s->keys_regs[MTK_PMIC_PWRKEY_INDEX]; + + error = of_property_read_u32(keys->dev->of_node, "power-off-time-sec", + &long_press_debounce); diff --git a/queue-6.1/input-synaptics-enable-intertouch-on-dell-precision-m3800.patch b/queue-6.1/input-synaptics-enable-intertouch-on-dell-precision-m3800.patch new file mode 100644 index 0000000000..6ee44bfa16 --- /dev/null +++ b/queue-6.1/input-synaptics-enable-intertouch-on-dell-precision-m3800.patch @@ -0,0 +1,32 @@ +From a609cb4cc07aa9ab8f50466622814356c06f2c17 Mon Sep 17 00:00:00 2001 +From: Aditya Garg +Date: Wed, 7 May 2025 12:12:15 -0700 +Subject: Input: synaptics - enable InterTouch on Dell Precision M3800 + +From: Aditya Garg + +commit a609cb4cc07aa9ab8f50466622814356c06f2c17 upstream. + +Enable InterTouch mode on Dell Precision M3800 by adding "DLL060d" to +the list of SMBus-enabled variants. + +Reported-by: Markus Rathgeb +Signed-off-by: Aditya Garg +Link: https://lore.kernel.org/r/PN3PR01MB959789DD6D574E16141E5DC4B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -163,6 +163,7 @@ static const char * const topbuttonpad_p + + static const char * const smbus_pnp_ids[] = { + /* all of the topbuttonpad_pnp_ids are valid, we just add some extras */ ++ "DLL060d", /* Dell Precision M3800 */ + "LEN0048", /* X1 Carbon 3 */ + "LEN0046", /* X250 */ + "LEN0049", /* Yoga 11e */ diff --git a/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch b/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch new file mode 100644 index 0000000000..3d869584d2 --- /dev/null +++ b/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch @@ -0,0 +1,38 @@ +From 6d7ea0881000966607772451b789b5fb5766f11d Mon Sep 17 00:00:00 2001 +From: Manuel Fombuena +Date: Wed, 7 May 2025 12:05:26 -0700 +Subject: Input: synaptics - enable InterTouch on Dynabook Portege X30-D + +From: Manuel Fombuena + +commit 6d7ea0881000966607772451b789b5fb5766f11d upstream. + +[ 5.989588] psmouse serio1: synaptics: Your touchpad (PNP: TOS0213 PNP0f03) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org. +[ 6.039923] psmouse serio1: synaptics: Touchpad model: 1, fw: 9.32, id: 0x1e2a1, caps: 0xf00223/0x840300/0x12e800/0x52d884, board id: 3322, fw id: 2658004 + +The board is labelled TM3322. + +Present on the Toshiba / Dynabook Portege X30-D and possibly others. + +Confirmed working well with psmouse.synaptics_intertouch=1 and local build. + +Signed-off-by: Manuel Fombuena +Signed-off-by: Aditya Garg +Link: https://lore.kernel.org/r/PN3PR01MB9597711E7933A08389FEC31DB888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -194,6 +194,7 @@ static const char * const smbus_pnp_ids[ + "SYN3221", /* HP 15-ay000 */ + "SYN323d", /* HP Spectre X360 13-w013dx */ + "SYN3257", /* HP Envy 13-ad105ng */ ++ "TOS0213", /* Dynabook Portege X30-D */ + NULL + }; + diff --git a/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch b/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch new file mode 100644 index 0000000000..2a29890830 --- /dev/null +++ b/queue-6.1/input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch @@ -0,0 +1,33 @@ +From 47d768b32e644b56901bb4bbbdb1feb01ea86c85 Mon Sep 17 00:00:00 2001 +From: Aditya Garg +Date: Wed, 7 May 2025 12:06:32 -0700 +Subject: Input: synaptics - enable InterTouch on Dynabook Portege X30L-G + +From: Aditya Garg + +commit 47d768b32e644b56901bb4bbbdb1feb01ea86c85 upstream. + +Enable InterTouch mode on Dynabook Portege X30L-G by adding "TOS01f6" to +the list of SMBus-enabled variants. + +Reported-by: Xuntao Chi +Tested-by: Xuntao Chi +Signed-off-by: Aditya Garg +Link: https://lore.kernel.org/r/PN3PR01MB959786E4AC797160CDA93012B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -194,6 +194,7 @@ static const char * const smbus_pnp_ids[ + "SYN3221", /* HP 15-ay000 */ + "SYN323d", /* HP Spectre X360 13-w013dx */ + "SYN3257", /* HP Envy 13-ad105ng */ ++ "TOS01f6", /* Dynabook Portege X30L-G */ + "TOS0213", /* Dynabook Portege X30-D */ + NULL + }; diff --git a/queue-6.1/input-synaptics-enable-intertouch-on-tuxedo-infinitybook-pro-14-v5.patch b/queue-6.1/input-synaptics-enable-intertouch-on-tuxedo-infinitybook-pro-14-v5.patch new file mode 100644 index 0000000000..4e4076d62e --- /dev/null +++ b/queue-6.1/input-synaptics-enable-intertouch-on-tuxedo-infinitybook-pro-14-v5.patch @@ -0,0 +1,36 @@ +From 2abc698ac77314e0de5b33a6d96a39c5159d88e4 Mon Sep 17 00:00:00 2001 +From: Aditya Garg +Date: Wed, 7 May 2025 12:09:00 -0700 +Subject: Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5 + +From: Aditya Garg + +commit 2abc698ac77314e0de5b33a6d96a39c5159d88e4 upstream. + +Enable InterTouch mode on TUXEDO InfinityBook Pro 14 v5 by adding +"SYN1221" to the list of SMBus-enabled variants. + +Add support for InterTouch on SYN1221 by adding it to the list of +SMBus-enabled variants. + +Reported-by: Matthias Eilert +Tested-by: Matthias Eilert +Signed-off-by: Aditya Garg +Link: https://lore.kernel.org/r/PN3PR01MB9597C033C4BC20EE2A0C4543B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -190,6 +190,7 @@ static const char * const smbus_pnp_ids[ + "LEN2054", /* E480 */ + "LEN2055", /* E580 */ + "LEN2068", /* T14 Gen 1 */ ++ "SYN1221", /* TUXEDO InfinityBook Pro 14 v5 */ + "SYN3003", /* HP EliteBook 850 G1 */ + "SYN3015", /* HP EliteBook 840 G2 */ + "SYN3052", /* HP EliteBook 840 G4 */ diff --git a/queue-6.1/input-synaptics-enable-smbus-for-hp-elitebook-850-g1.patch b/queue-6.1/input-synaptics-enable-smbus-for-hp-elitebook-850-g1.patch new file mode 100644 index 0000000000..3c19b26301 --- /dev/null +++ b/queue-6.1/input-synaptics-enable-smbus-for-hp-elitebook-850-g1.patch @@ -0,0 +1,31 @@ +From f04f03d3e99bc8f89b6af5debf07ff67d961bc23 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Wed, 7 May 2025 14:52:55 -0700 +Subject: Input: synaptics - enable SMBus for HP Elitebook 850 G1 + +From: Dmitry Torokhov + +commit f04f03d3e99bc8f89b6af5debf07ff67d961bc23 upstream. + +The kernel reports that the touchpad for this device can support +SMBus mode. + +Reported-by: jt +Link: https://lore.kernel.org/r/iys5dbv3ldddsgobfkxldazxyp54kay4bozzmagga6emy45jop@2ebvuxgaui4u +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -190,6 +190,7 @@ static const char * const smbus_pnp_ids[ + "LEN2054", /* E480 */ + "LEN2055", /* E580 */ + "LEN2068", /* T14 Gen 1 */ ++ "SYN3003", /* HP EliteBook 850 G1 */ + "SYN3015", /* HP EliteBook 840 G2 */ + "SYN3052", /* HP EliteBook 840 G4 */ + "SYN3221", /* HP 15-ay000 */ diff --git a/queue-6.1/series b/queue-6.1/series index f3df320423..49d7af2d66 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -5,7 +5,6 @@ can-mcp251xfd-mcp251xfd_remove-fix-order-of-unregistration-calls.patch ksmbd-prevent-out-of-bounds-stream-writes-by-validating-pos.patch openvswitch-fix-unsafe-attribute-parsing-in-output_userspace.patch ksmbd-fix-memory-leak-in-parse_lease_state.patch -s390-entry-fix-last-breaking-event-handling-in-case-.patch sch_htb-make-htb_deactivate-idempotent.patch gre-fix-again-ipv6-link-local-address-generation.patch can-mcp251xfd-fix-tdc-setting-for-low-data-bit-rates.patch @@ -21,3 +20,12 @@ net-dsa-b53-fix-flushing-old-pvid-vlan-on-pvid-chang.patch net-dsa-b53-fix-vlan-id-for-untagged-vlan-on-bridge-.patch net-dsa-b53-always-rejoin-default-untagged-vlan-on-b.patch net-dsa-b53-fix-learning-on-vlan-unaware-bridges.patch +input-mtk-pmic-keys-fix-possible-null-pointer-dereference.patch +input-synaptics-enable-intertouch-on-dynabook-portege-x30-d.patch +input-synaptics-enable-intertouch-on-dynabook-portege-x30l-g.patch +input-synaptics-enable-intertouch-on-dell-precision-m3800.patch +input-synaptics-enable-smbus-for-hp-elitebook-850-g1.patch +input-synaptics-enable-intertouch-on-tuxedo-infinitybook-pro-14-v5.patch +staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch +staging-axis-fifo-remove-hardware-resets-for-user-errors.patch +staging-axis-fifo-correct-handling-of-tx_fifo_depth-for-size-validation.patch diff --git a/queue-6.1/staging-axis-fifo-correct-handling-of-tx_fifo_depth-for-size-validation.patch b/queue-6.1/staging-axis-fifo-correct-handling-of-tx_fifo_depth-for-size-validation.patch new file mode 100644 index 0000000000..1a15e8169e --- /dev/null +++ b/queue-6.1/staging-axis-fifo-correct-handling-of-tx_fifo_depth-for-size-validation.patch @@ -0,0 +1,38 @@ +From 2ca34b508774aaa590fc3698a54204706ecca4ba Mon Sep 17 00:00:00 2001 +From: Gabriel Shahrouzi +Date: Fri, 18 Apr 2025 21:29:37 -0400 +Subject: staging: axis-fifo: Correct handling of tx_fifo_depth for size validation + +From: Gabriel Shahrouzi + +commit 2ca34b508774aaa590fc3698a54204706ecca4ba upstream. + +Remove erroneous subtraction of 4 from the total FIFO depth read from +device tree. The stored depth is for checking against total capacity, +not initial vacancy. This prevented writes near the FIFO's full size. + +The check performed just before data transfer, which uses live reads of +the TDFV register to determine current vacancy, correctly handles the +initial Depth - 4 hardware state and subsequent FIFO fullness. + +Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core") +Cc: stable@vger.kernel.org +Signed-off-by: Gabriel Shahrouzi +Link: https://lore.kernel.org/r/20250419012937.674924-1-gshahrouzi@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/staging/axis-fifo/axis-fifo.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/staging/axis-fifo/axis-fifo.c ++++ b/drivers/staging/axis-fifo/axis-fifo.c +@@ -777,9 +777,6 @@ static int axis_fifo_parse_dt(struct axi + goto end; + } + +- /* IP sets TDFV to fifo depth - 4 so we will do the same */ +- fifo->tx_fifo_depth -= 4; +- + ret = get_dts_property(fifo, "xlnx,use-rx-data", &fifo->has_rx_fifo); + if (ret) { + dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n"); diff --git a/queue-6.1/staging-axis-fifo-remove-hardware-resets-for-user-errors.patch b/queue-6.1/staging-axis-fifo-remove-hardware-resets-for-user-errors.patch new file mode 100644 index 0000000000..dc6c56602f --- /dev/null +++ b/queue-6.1/staging-axis-fifo-remove-hardware-resets-for-user-errors.patch @@ -0,0 +1,73 @@ +From c6e8d85fafa7193613db37da29c0e8d6e2515b13 Mon Sep 17 00:00:00 2001 +From: Gabriel Shahrouzi +Date: Fri, 18 Apr 2025 20:43:06 -0400 +Subject: staging: axis-fifo: Remove hardware resets for user errors + +From: Gabriel Shahrouzi + +commit c6e8d85fafa7193613db37da29c0e8d6e2515b13 upstream. + +The axis-fifo driver performs a full hardware reset (via +reset_ip_core()) in several error paths within the read and write +functions. This reset flushes both TX and RX FIFOs and resets the +AXI-Stream links. + +Allow the user to handle the error without causing hardware disruption +or data loss in other FIFO paths. + +Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core") +Cc: stable@vger.kernel.org +Signed-off-by: Gabriel Shahrouzi +Link: https://lore.kernel.org/r/20250419004306.669605-1-gshahrouzi@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/staging/axis-fifo/axis-fifo.c | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +--- a/drivers/staging/axis-fifo/axis-fifo.c ++++ b/drivers/staging/axis-fifo/axis-fifo.c +@@ -400,16 +400,14 @@ static ssize_t axis_fifo_read(struct fil + + bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET); + if (!bytes_available) { +- dev_err(fifo->dt_device, "received a packet of length 0 - fifo core will be reset\n"); +- reset_ip_core(fifo); ++ dev_err(fifo->dt_device, "received a packet of length 0\n"); + ret = -EIO; + goto end_unlock; + } + + if (bytes_available > len) { +- dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu) - fifo core will be reset\n", ++ dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n", + bytes_available, len); +- reset_ip_core(fifo); + ret = -EINVAL; + goto end_unlock; + } +@@ -418,8 +416,7 @@ static ssize_t axis_fifo_read(struct fil + /* this probably can't happen unless IP + * registers were previously mishandled + */ +- dev_err(fifo->dt_device, "received a packet that isn't word-aligned - fifo core will be reset\n"); +- reset_ip_core(fifo); ++ dev_err(fifo->dt_device, "received a packet that isn't word-aligned\n"); + ret = -EIO; + goto end_unlock; + } +@@ -440,7 +437,6 @@ static ssize_t axis_fifo_read(struct fil + + if (copy_to_user(buf + copied * sizeof(u32), tmp_buf, + copy * sizeof(u32))) { +- reset_ip_core(fifo); + ret = -EFAULT; + goto end_unlock; + } +@@ -549,7 +545,6 @@ static ssize_t axis_fifo_write(struct fi + + if (copy_from_user(tmp_buf, buf + copied * sizeof(u32), + copy * sizeof(u32))) { +- reset_ip_core(fifo); + ret = -EFAULT; + goto end_unlock; + } diff --git a/queue-6.1/staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch b/queue-6.1/staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch new file mode 100644 index 0000000000..0352fc50d5 --- /dev/null +++ b/queue-6.1/staging-iio-adc-ad7816-correct-conditional-logic-for-store-mode.patch @@ -0,0 +1,46 @@ +From 2e922956277187655ed9bedf7b5c28906e51708f Mon Sep 17 00:00:00 2001 +From: Gabriel Shahrouzi +Date: Mon, 14 Apr 2025 11:40:49 -0400 +Subject: staging: iio: adc: ad7816: Correct conditional logic for store mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Gabriel Shahrouzi + +commit 2e922956277187655ed9bedf7b5c28906e51708f upstream. + +The mode setting logic in ad7816_store_mode was reversed due to +incorrect handling of the strcmp return value. strcmp returns 0 on +match, so the `if (strcmp(buf, "full"))` block executed when the +input was not "full". + +This resulted in "full" setting the mode to AD7816_PD (power-down) and +other inputs setting it to AD7816_FULL. + +Fix this by checking it against 0 to correctly check for "full" and +"power-down", mapping them to AD7816_FULL and AD7816_PD respectively. + +Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices") +Cc: stable@vger.kernel.org +Signed-off-by: Gabriel Shahrouzi +Acked-by: Nuno Sá +Link: https://lore.kernel.org/stable/20250414152920.467505-1-gshahrouzi%40gmail.com +Link: https://patch.msgid.link/20250414154050.469482-1-gshahrouzi@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/staging/iio/adc/ad7816.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/iio/adc/ad7816.c ++++ b/drivers/staging/iio/adc/ad7816.c +@@ -136,7 +136,7 @@ static ssize_t ad7816_store_mode(struct + struct iio_dev *indio_dev = dev_to_iio_dev(dev); + struct ad7816_chip_info *chip = iio_priv(indio_dev); + +- if (strcmp(buf, "full")) { ++ if (strcmp(buf, "full") == 0) { + gpiod_set_value(chip->rdwr_pin, 1); + chip->mode = AD7816_FULL; + } else {