From: Sasha Levin Date: Sat, 4 Nov 2023 03:00:48 +0000 (-0400) Subject: Fixes for 5.4 X-Git-Tag: v4.14.329~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78b6f9a0749f484a5d1c2d2a186ae608fa007c41;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/asoc-rt5650-fix-the-wrong-result-of-key-button.patch b/queue-5.4/asoc-rt5650-fix-the-wrong-result-of-key-button.patch new file mode 100644 index 00000000000..e5a78cdb2f5 --- /dev/null +++ b/queue-5.4/asoc-rt5650-fix-the-wrong-result-of-key-button.patch @@ -0,0 +1,35 @@ +From 76ca91a62105e117c240be98c0101775e1d9ae4c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 13 Oct 2023 17:45:25 +0800 +Subject: ASoC: rt5650: fix the wrong result of key button + +From: Shuming Fan + +[ Upstream commit f88dfbf333b3661faff996bb03af2024d907b76a ] + +The RT5650 should enable a power setting for button detection to avoid the wrong result. + +Signed-off-by: Shuming Fan +Link: https://lore.kernel.org/r/20231013094525.715518-1-shumingf@realtek.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/rt5645.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c +index a66e93a3af745..9fda0e5548dc6 100644 +--- a/sound/soc/codecs/rt5645.c ++++ b/sound/soc/codecs/rt5645.c +@@ -3241,6 +3241,8 @@ int rt5645_set_jack_detect(struct snd_soc_component *component, + RT5645_GP1_PIN_IRQ, RT5645_GP1_PIN_IRQ); + regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1, + RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL); ++ regmap_update_bits(rt5645->regmap, RT5645_DEPOP_M1, ++ RT5645_HP_CB_MASK, RT5645_HP_CB_PU); + } + rt5645_irq(0, rt5645); + +-- +2.42.0 + diff --git a/queue-5.4/dmaengine-ste_dma40-fix-pm-disable-depth-imbalance-i.patch b/queue-5.4/dmaengine-ste_dma40-fix-pm-disable-depth-imbalance-i.patch new file mode 100644 index 00000000000..351c60e15dc --- /dev/null +++ b/queue-5.4/dmaengine-ste_dma40-fix-pm-disable-depth-imbalance-i.patch @@ -0,0 +1,38 @@ +From 729b446b8785fffd7d9615850f6c5dc1d7df7d23 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 5 Oct 2023 22:28:35 +0800 +Subject: dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe + +From: Zhang Shurong + +[ Upstream commit 0618c077a8c20e8c81e367988f70f7e32bb5a717 ] + +The pm_runtime_enable will increase power disable depth. Thus +a pairing decrement is needed on the error handling path to +keep it balanced according to context. +We fix it by calling pm_runtime_disable when error returns. + +Signed-off-by: Zhang Shurong +Reviewed-by: Linus Walleij +Link: https://lore.kernel.org/r/tencent_DD2D371DB5925B4B602B1E1D0A5FA88F1208@qq.com +Signed-off-by: Vinod Koul +Signed-off-by: Sasha Levin +--- + drivers/dma/ste_dma40.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c +index 96a808b487cbe..fa0ad8581edcc 100644 +--- a/drivers/dma/ste_dma40.c ++++ b/drivers/dma/ste_dma40.c +@@ -3700,6 +3700,7 @@ static int __init d40_probe(struct platform_device *pdev) + regulator_disable(base->lcpa_regulator); + regulator_put(base->lcpa_regulator); + } ++ pm_runtime_disable(base->dev); + + kfree(base->lcla_pool.alloc_map); + kfree(base->lookup_log_chans); +-- +2.42.0 + diff --git a/queue-5.4/fbdev-atyfb-only-use-ioremap_uc-on-i386-and-ia64.patch b/queue-5.4/fbdev-atyfb-only-use-ioremap_uc-on-i386-and-ia64.patch new file mode 100644 index 00000000000..56f066478ac --- /dev/null +++ b/queue-5.4/fbdev-atyfb-only-use-ioremap_uc-on-i386-and-ia64.patch @@ -0,0 +1,58 @@ +From f87649b4817001ac53d5500ece74d8028c21e17a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 21 Sep 2023 19:04:21 +0800 +Subject: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 + +From: Arnd Bergmann + +[ Upstream commit c1a8d1d0edb71dec15c9649cb56866c71c1ecd9e ] + +ioremap_uc() is only meaningful on old x86-32 systems with the PAT +extension, and on ia64 with its slightly unconventional ioremap() +behavior, everywhere else this is the same as ioremap() anyway. + +Change the only driver that still references ioremap_uc() to only do so +on x86-32/ia64 in order to allow removing that interface at some +point in the future for the other architectures. + +On some architectures, ioremap_uc() just returns NULL, changing +the driver to call ioremap() means that they now have a chance +of working correctly. + +Signed-off-by: Arnd Bergmann +Signed-off-by: Baoquan He +Reviewed-by: Luis Chamberlain +Cc: Helge Deller +Cc: Thomas Zimmermann +Cc: Christophe Leroy +Cc: linux-fbdev@vger.kernel.org +Cc: dri-devel@lists.freedesktop.org +Signed-off-by: Helge Deller +Signed-off-by: Sasha Levin +--- + drivers/video/fbdev/aty/atyfb_base.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c +index 6dda5d885a03b..bb9ecf12e7630 100644 +--- a/drivers/video/fbdev/aty/atyfb_base.c ++++ b/drivers/video/fbdev/aty/atyfb_base.c +@@ -3410,11 +3410,15 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, + } + + info->fix.mmio_start = raddr; ++#if defined(__i386__) || defined(__ia64__) + /* + * By using strong UC we force the MTRR to never have an + * effect on the MMIO region on both non-PAT and PAT systems. + */ + par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000); ++#else ++ par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); ++#endif + if (par->ati_regbase == NULL) + return -ENOMEM; + +-- +2.42.0 + diff --git a/queue-5.4/fbdev-uvesafb-call-cn_del_callback-at-the-end-of-uve.patch b/queue-5.4/fbdev-uvesafb-call-cn_del_callback-at-the-end-of-uve.patch new file mode 100644 index 00000000000..130175ff1c1 --- /dev/null +++ b/queue-5.4/fbdev-uvesafb-call-cn_del_callback-at-the-end-of-uve.patch @@ -0,0 +1,41 @@ +From 7232fe3c90380a6c09cc7d5b6932a0fb826a2f3c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 6 Oct 2023 17:43:47 -0300 +Subject: fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() + +From: Jorge Maidana + +[ Upstream commit 1022e7e2f40574c74ed32c3811b03d26b0b81daf ] + +Delete the v86d netlink only after all the VBE tasks have been +completed. + +Fixes initial state restore on module unload: +uvesafb: VBE state restore call failed (eax=0x4f04, err=-19) + +Signed-off-by: Jorge Maidana +Signed-off-by: Helge Deller +Signed-off-by: Sasha Levin +--- + drivers/video/fbdev/uvesafb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c +index 7d3af1d19ad3f..115653ba761c0 100644 +--- a/drivers/video/fbdev/uvesafb.c ++++ b/drivers/video/fbdev/uvesafb.c +@@ -1933,10 +1933,10 @@ static void uvesafb_exit(void) + } + } + +- cn_del_callback(&uvesafb_cn_id); + driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d); + platform_device_unregister(uvesafb_device); + platform_driver_unregister(&uvesafb_driver); ++ cn_del_callback(&uvesafb_cn_id); + } + + module_exit(uvesafb_exit); +-- +2.42.0 + diff --git a/queue-5.4/input-i8042-add-fujitsu-lifebook-e5411-to-i8042-quir.patch b/queue-5.4/input-i8042-add-fujitsu-lifebook-e5411-to-i8042-quir.patch new file mode 100644 index 00000000000..7dd63bc1198 --- /dev/null +++ b/queue-5.4/input-i8042-add-fujitsu-lifebook-e5411-to-i8042-quir.patch @@ -0,0 +1,52 @@ +From 2551d2037e6cd21f6680faedc8988030c64fa7f0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 4 Oct 2023 05:47:01 -0700 +Subject: Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table + +From: Szilard Fabian + +[ Upstream commit 80f39e1c27ba9e5a1ea7e68e21c569c9d8e46062 ] + +In the initial boot stage the integrated keyboard of Fujitsu Lifebook E5411 +refuses to work and it's not possible to type for example a dm-crypt +passphrase without the help of an external keyboard. + +i8042.nomux kernel parameter resolves this issue but using that a PS/2 +mouse is detected. This input device is unused even when the i2c-hid-acpi +kernel module is blacklisted making the integrated ELAN touchpad +(04F3:308A) not working at all. + +Since the integrated touchpad is managed by the i2c_designware input +driver in the Linux kernel and you can't find a PS/2 mouse port on the +computer I think it's safe to not use the PS/2 mouse port at all. + +Signed-off-by: Szilard Fabian +Link: https://lore.kernel.org/r/20231004011749.101789-1-szfabian@bluemarch.art +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h +index 700655741bf28..5df6eef18228d 100644 +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -609,6 +609,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX) + }, ++ { ++ /* Fujitsu Lifebook E5411 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5411"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOAUX) ++ }, + { + /* Gigabyte M912 */ + .matches = { +-- +2.42.0 + diff --git a/queue-5.4/input-synaptics-rmi4-handle-reset-delay-when-using-s.patch b/queue-5.4/input-synaptics-rmi4-handle-reset-delay-when-using-s.patch new file mode 100644 index 00000000000..b673ff46842 --- /dev/null +++ b/queue-5.4/input-synaptics-rmi4-handle-reset-delay-when-using-s.patch @@ -0,0 +1,135 @@ +From 8b99503ad3ff9bcacd4cff3fc10fa10f0e43d2d0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 13 Oct 2023 17:29:57 -0700 +Subject: Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport + +From: Dmitry Torokhov + +[ Upstream commit 5030b2fe6aab37fe42d14f31842ea38be7c55c57 ] + +Touch controllers need some time after receiving reset command for the +firmware to finish re-initializing and be ready to respond to commands +from the host. The driver already had handling for the post-reset delay +for I2C and SPI transports, this change adds the handling to +SMBus-connected devices. + +SMBus devices are peculiar because they implement legacy PS/2 +compatibility mode, so reset is actually issued by psmouse driver on the +associated serio port, after which the control is passed to the RMI4 +driver with SMBus companion device. + +Note that originally the delay was added to psmouse driver in +92e24e0e57f7 ("Input: psmouse - add delay when deactivating for SMBus +mode"), but that resulted in an unwanted delay in "fast" reconnect +handler for the serio port, so it was decided to revert the patch and +have the delay being handled in the RMI4 driver, similar to the other +transports. + +Tested-by: Jeffery Miller +Link: https://lore.kernel.org/r/ZR1yUFJ8a9Zt606N@penguin +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/mouse/synaptics.c | 1 + + drivers/input/rmi4/rmi_smbus.c | 50 ++++++++++++++++++--------------- + 2 files changed, 29 insertions(+), 22 deletions(-) + +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c +index f2383c91113c3..9cfd2c1d4e3af 100644 +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -1747,6 +1747,7 @@ static int synaptics_create_intertouch(struct psmouse *psmouse, + psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) && + !SYN_CAP_EXT_BUTTONS_STICK(info->ext_cap_10); + const struct rmi_device_platform_data pdata = { ++ .reset_delay_ms = 30, + .sensor_pdata = { + .sensor_type = rmi_sensor_touchpad, + .axis_align.flip_y = true, +diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c +index 2407ea43de59b..f38bf9a5f599d 100644 +--- a/drivers/input/rmi4/rmi_smbus.c ++++ b/drivers/input/rmi4/rmi_smbus.c +@@ -235,12 +235,29 @@ static void rmi_smb_clear_state(struct rmi_smb_xport *rmi_smb) + + static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb) + { +- int retval; ++ struct i2c_client *client = rmi_smb->client; ++ int smbus_version; ++ ++ /* ++ * psmouse driver resets the controller, we only need to wait ++ * to give the firmware chance to fully reinitialize. ++ */ ++ if (rmi_smb->xport.pdata.reset_delay_ms) ++ msleep(rmi_smb->xport.pdata.reset_delay_ms); + + /* we need to get the smbus version to activate the touchpad */ +- retval = rmi_smb_get_version(rmi_smb); +- if (retval < 0) +- return retval; ++ smbus_version = rmi_smb_get_version(rmi_smb); ++ if (smbus_version < 0) ++ return smbus_version; ++ ++ rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", ++ smbus_version); ++ ++ if (smbus_version != 2 && smbus_version != 3) { ++ dev_err(&client->dev, "Unrecognized SMB version %d\n", ++ smbus_version); ++ return -ENODEV; ++ } + + return 0; + } +@@ -253,11 +270,10 @@ static int rmi_smb_reset(struct rmi_transport_dev *xport, u16 reset_addr) + rmi_smb_clear_state(rmi_smb); + + /* +- * we do not call the actual reset command, it has to be handled in +- * PS/2 or there will be races between PS/2 and SMBus. +- * PS/2 should ensure that a psmouse_reset is called before +- * intializing the device and after it has been removed to be in a known +- * state. ++ * We do not call the actual reset command, it has to be handled in ++ * PS/2 or there will be races between PS/2 and SMBus. PS/2 should ++ * ensure that a psmouse_reset is called before initializing the ++ * device and after it has been removed to be in a known state. + */ + return rmi_smb_enable_smbus_mode(rmi_smb); + } +@@ -273,7 +289,6 @@ static int rmi_smb_probe(struct i2c_client *client, + { + struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev); + struct rmi_smb_xport *rmi_smb; +- int smbus_version; + int error; + + if (!pdata) { +@@ -312,18 +327,9 @@ static int rmi_smb_probe(struct i2c_client *client, + rmi_smb->xport.proto_name = "smb"; + rmi_smb->xport.ops = &rmi_smb_ops; + +- smbus_version = rmi_smb_get_version(rmi_smb); +- if (smbus_version < 0) +- return smbus_version; +- +- rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", +- smbus_version); +- +- if (smbus_version != 2 && smbus_version != 3) { +- dev_err(&client->dev, "Unrecognized SMB version %d\n", +- smbus_version); +- return -ENODEV; +- } ++ error = rmi_smb_enable_smbus_mode(rmi_smb); ++ if (error) ++ return error; + + i2c_set_clientdata(client, rmi_smb); + +-- +2.42.0 + diff --git a/queue-5.4/irqchip-stm32-exti-add-missing-dt-irq-flag-translati.patch b/queue-5.4/irqchip-stm32-exti-add-missing-dt-irq-flag-translati.patch new file mode 100644 index 00000000000..826b3ead9c8 --- /dev/null +++ b/queue-5.4/irqchip-stm32-exti-add-missing-dt-irq-flag-translati.patch @@ -0,0 +1,37 @@ +From 190e1f1ed665ae64ef1fbf4a709d8b5ab1893d53 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 3 Oct 2023 12:20:03 -0400 +Subject: irqchip/stm32-exti: add missing DT IRQ flag translation + +From: Ben Wolsieffer + +[ Upstream commit 8554cba1d6dbd3c74e0549e28ddbaccbb1d6b30a ] + +The STM32F4/7 EXTI driver was missing the xlate callback, so IRQ trigger +flags specified in the device tree were being ignored. This was +preventing the RTC alarm interrupt from working, because it must be set +to trigger on the rising edge to function correctly. + +Signed-off-by: Ben Wolsieffer +Signed-off-by: Marc Zyngier +Link: https://lore.kernel.org/r/20231003162003.1649967-1-ben.wolsieffer@hefring.com +Signed-off-by: Sasha Levin +--- + drivers/irqchip/irq-stm32-exti.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c +index a8322a4e18d36..df18465a0985f 100644 +--- a/drivers/irqchip/irq-stm32-exti.c ++++ b/drivers/irqchip/irq-stm32-exti.c +@@ -414,6 +414,7 @@ static const struct irq_domain_ops irq_exti_domain_ops = { + .map = irq_map_generic_chip, + .alloc = stm32_exti_alloc, + .free = stm32_exti_free, ++ .xlate = irq_domain_xlate_twocell, + }; + + static void stm32_irq_ack(struct irq_data *d) +-- +2.42.0 + diff --git a/queue-5.4/net-chelsio-cxgb4-add-an-error-code-check-in-t4_load.patch b/queue-5.4/net-chelsio-cxgb4-add-an-error-code-check-in-t4_load.patch new file mode 100644 index 00000000000..92e9554bd0b --- /dev/null +++ b/queue-5.4/net-chelsio-cxgb4-add-an-error-code-check-in-t4_load.patch @@ -0,0 +1,35 @@ +From fa836087e59d2fdbd5dac3e872b25f486b542c61 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 20 Oct 2023 17:27:59 +0800 +Subject: net: chelsio: cxgb4: add an error code check in t4_load_phy_fw + +From: Su Hui + +[ Upstream commit 9f771493da935299c6393ad3563b581255d01a37 ] + +t4_set_params_timeout() can return -EINVAL if failed, add check +for this. + +Signed-off-by: Su Hui +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +index 42374859b9d35..cb3f515559c27 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +@@ -3850,6 +3850,8 @@ int t4_load_phy_fw(struct adapter *adap, + FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD)); + ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, + ¶m, &val, 30000); ++ if (ret) ++ return ret; + + /* If we have version number support, then check to see that the new + * firmware got loaded properly. +-- +2.42.0 + diff --git a/queue-5.4/netfilter-nfnetlink_log-silence-bogus-compiler-warni.patch b/queue-5.4/netfilter-nfnetlink_log-silence-bogus-compiler-warni.patch new file mode 100644 index 00000000000..a088238c884 --- /dev/null +++ b/queue-5.4/netfilter-nfnetlink_log-silence-bogus-compiler-warni.patch @@ -0,0 +1,39 @@ +From 9f9689004959c55ff9043d2ba330da778e0d22ce Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 5 Oct 2023 10:53:08 +0200 +Subject: netfilter: nfnetlink_log: silence bogus compiler warning + +From: Florian Westphal + +[ Upstream commit 2e1d175410972285333193837a4250a74cd472e6 ] + +net/netfilter/nfnetlink_log.c:800:18: warning: variable 'ctinfo' is uninitialized + +The warning is bogus, the variable is only used if ct is non-NULL and +always initialised in that case. Init to 0 too to silence this. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202309100514.ndBFebXN-lkp@intel.com/ +Signed-off-by: Florian Westphal +Signed-off-by: Sasha Levin +--- + net/netfilter/nfnetlink_log.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c +index f087baa95b07b..80c09070ea9fa 100644 +--- a/net/netfilter/nfnetlink_log.c ++++ b/net/netfilter/nfnetlink_log.c +@@ -683,8 +683,8 @@ nfulnl_log_packet(struct net *net, + unsigned int plen = 0; + struct nfnl_log_net *log = nfnl_log_pernet(net); + const struct nfnl_ct_hook *nfnl_ct = NULL; ++ enum ip_conntrack_info ctinfo = 0; + struct nf_conn *ct = NULL; +- enum ip_conntrack_info ctinfo; + + if (li_user && li_user->type == NF_LOG_TYPE_ULOG) + li = li_user; +-- +2.42.0 + diff --git a/queue-5.4/platform-mellanox-mlxbf-tmfifo-fix-a-warning-message.patch b/queue-5.4/platform-mellanox-mlxbf-tmfifo-fix-a-warning-message.patch new file mode 100644 index 00000000000..08c89ee38a3 --- /dev/null +++ b/queue-5.4/platform-mellanox-mlxbf-tmfifo-fix-a-warning-message.patch @@ -0,0 +1,65 @@ +From 63cd662e3c106d8290e92f7a83f804278f104a7a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 12 Oct 2023 19:02:35 -0400 +Subject: platform/mellanox: mlxbf-tmfifo: Fix a warning message + +From: Liming Sun + +[ Upstream commit 99c09c985e5973c8f0ad976ebae069548dd86f12 ] + +This commit fixes the smatch static checker warning in function +mlxbf_tmfifo_rxtx_word() which complains data not initialized at +line 634 when IS_VRING_DROP() is TRUE. + +Signed-off-by: Liming Sun +Link: https://lore.kernel.org/r/20231012230235.219861-1-limings@nvidia.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/mellanox/mlxbf-tmfifo.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c +index 194f3205e5597..767f4406e55f1 100644 +--- a/drivers/platform/mellanox/mlxbf-tmfifo.c ++++ b/drivers/platform/mellanox/mlxbf-tmfifo.c +@@ -588,24 +588,25 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring, + + if (vring->cur_len + sizeof(u64) <= len) { + /* The whole word. */ +- if (!IS_VRING_DROP(vring)) { +- if (is_rx) ++ if (is_rx) { ++ if (!IS_VRING_DROP(vring)) + memcpy(addr + vring->cur_len, &data, + sizeof(u64)); +- else +- memcpy(&data, addr + vring->cur_len, +- sizeof(u64)); ++ } else { ++ memcpy(&data, addr + vring->cur_len, ++ sizeof(u64)); + } + vring->cur_len += sizeof(u64); + } else { + /* Leftover bytes. */ +- if (!IS_VRING_DROP(vring)) { +- if (is_rx) ++ if (is_rx) { ++ if (!IS_VRING_DROP(vring)) + memcpy(addr + vring->cur_len, &data, + len - vring->cur_len); +- else +- memcpy(&data, addr + vring->cur_len, +- len - vring->cur_len); ++ } else { ++ data = 0; ++ memcpy(&data, addr + vring->cur_len, ++ len - vring->cur_len); + } + vring->cur_len = len; + } +-- +2.42.0 + diff --git a/queue-5.4/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-.patch b/queue-5.4/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-.patch new file mode 100644 index 00000000000..6f722d5c466 --- /dev/null +++ b/queue-5.4/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-.patch @@ -0,0 +1,72 @@ +From a7f3962fd53867965377bfaac3eceb00c16442fc Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Oct 2023 11:07:23 +0200 +Subject: platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to + 0x2e + +From: Hans de Goede + +[ Upstream commit f37cc2fc277b371fc491890afb7d8a26e36bb3a1 ] + +Older Asus laptops change the backlight level themselves and then send +WMI events with different codes for different backlight levels. + +The asus-wmi.c code maps the entire range of codes reported on +brightness down keypresses to an internal ASUS_WMI_BRN_DOWN code: + +define NOTIFY_BRNUP_MIN 0x11 +define NOTIFY_BRNUP_MAX 0x1f +define NOTIFY_BRNDOWN_MIN 0x20 +define NOTIFY_BRNDOWN_MAX 0x2e + + if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) + code = ASUS_WMI_BRN_UP; + else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX) + code = ASUS_WMI_BRN_DOWN; + +Before this commit all the NOTIFY_BRNDOWN_MIN - NOTIFY_BRNDOWN_MAX +aka 0x20 - 0x2e events were mapped to 0x20. + +This mapping is causing issues on new laptop models which actually +send 0x2b events for printscreen presses and 0x2c events for +capslock presses, which get translated into spurious brightness-down +presses. + +The plan is disable the 0x11-0x2e special mapping on laptops +where asus-wmi does not register a backlight-device to avoid +the spurious brightness-down keypresses. New laptops always send +0x2e for brightness-down presses, change the special internal +ASUS_WMI_BRN_DOWN value from 0x20 to 0x2e to match this in +preparation for fixing the spurious brightness-down presses. + +This change does not have any functional impact since all +of 0x20 - 0x2e is mapped to ASUS_WMI_BRN_DOWN first and only +then checked against the keymap code and the new 0x2e +value is still in the 0x20 - 0x2e range. + +Reported-by: James John +Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/ +Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716 +Signed-off-by: Hans de Goede +Link: https://lore.kernel.org/r/20231017090725.38163-2-hdegoede@redhat.com +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/asus-wmi.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h +index 4f31b68642a08..6faf213f687a3 100644 +--- a/drivers/platform/x86/asus-wmi.h ++++ b/drivers/platform/x86/asus-wmi.h +@@ -18,7 +18,7 @@ + #include + + #define ASUS_WMI_KEY_IGNORE (-1) +-#define ASUS_WMI_BRN_DOWN 0x20 ++#define ASUS_WMI_BRN_DOWN 0x2e + #define ASUS_WMI_BRN_UP 0x2f + + struct module; +-- +2.42.0 + diff --git a/queue-5.4/scsi-mpt3sas-fix-in-error-path.patch b/queue-5.4/scsi-mpt3sas-fix-in-error-path.patch new file mode 100644 index 00000000000..3abeb704d5e --- /dev/null +++ b/queue-5.4/scsi-mpt3sas-fix-in-error-path.patch @@ -0,0 +1,39 @@ +From 13766cd7b8232b9ad5af4b81723893a08fb799bd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 15 Oct 2023 13:45:29 +0200 +Subject: scsi: mpt3sas: Fix in error path + +From: Tomas Henzl + +[ Upstream commit e40c04ade0e2f3916b78211d747317843b11ce10 ] + +The driver should be deregistered as misc driver after PCI registration +failure. + +Signed-off-by: Tomas Henzl +Link: https://lore.kernel.org/r/20231015114529.10725-1-thenzl@redhat.com +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c +index 044a00edb5459..4731e464dfb95 100644 +--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c ++++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c +@@ -11138,8 +11138,10 @@ _mpt3sas_init(void) + mpt3sas_ctl_init(hbas_to_enumerate); + + error = pci_register_driver(&mpt3sas_driver); +- if (error) ++ if (error) { ++ mpt3sas_ctl_exit(hbas_to_enumerate); + scsih_exit(); ++ } + + return error; + } +-- +2.42.0 + diff --git a/queue-5.4/series b/queue-5.4/series index e84ec68f79f..8a1d71a4cdb 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -48,3 +48,16 @@ rpmsg-fix-calling-device_lock-on-non-initialized-device.patch rpmsg-glink-release-driver_override.patch rpmsg-fix-possible-refcount-leak-in-rpmsg_register_device_override.patch x86-fix-.brk-attribute-in-linker-script.patch +input-i8042-add-fujitsu-lifebook-e5411-to-i8042-quir.patch +irqchip-stm32-exti-add-missing-dt-irq-flag-translati.patch +dmaengine-ste_dma40-fix-pm-disable-depth-imbalance-i.patch +input-synaptics-rmi4-handle-reset-delay-when-using-s.patch +fbdev-atyfb-only-use-ioremap_uc-on-i386-and-ia64.patch +spi-npcm-fiu-fix-uma-reads-when-dummy.nbytes-0.patch +netfilter-nfnetlink_log-silence-bogus-compiler-warni.patch +asoc-rt5650-fix-the-wrong-result-of-key-button.patch +fbdev-uvesafb-call-cn_del_callback-at-the-end-of-uve.patch +scsi-mpt3sas-fix-in-error-path.patch +platform-x86-asus-wmi-change-asus_wmi_brn_down-code-.patch +platform-mellanox-mlxbf-tmfifo-fix-a-warning-message.patch +net-chelsio-cxgb4-add-an-error-code-check-in-t4_load.patch diff --git a/queue-5.4/spi-npcm-fiu-fix-uma-reads-when-dummy.nbytes-0.patch b/queue-5.4/spi-npcm-fiu-fix-uma-reads-when-dummy.nbytes-0.patch new file mode 100644 index 00000000000..7d5660891a7 --- /dev/null +++ b/queue-5.4/spi-npcm-fiu-fix-uma-reads-when-dummy.nbytes-0.patch @@ -0,0 +1,40 @@ +From c52094d01fc2074610ee082c1d41a63e55ea1fdd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Sep 2023 11:28:12 -0700 +Subject: spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0 + +From: William A. Kennington III + +[ Upstream commit 2ec8b010979036c2fe79a64adb6ecc0bd11e91d1 ] + +We don't want to use the value of ilog2(0) as dummy.buswidth is 0 when +dummy.nbytes is 0. Since we have no dummy bytes, we don't need to +configure the dummy byte bits per clock register value anyway. + +Signed-off-by: "William A. Kennington III" +Link: https://lore.kernel.org/r/20230922182812.2728066-1-william@wkennington.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/spi/spi-npcm-fiu.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c +index 1e770d6739050..cc4e29cd86dab 100644 +--- a/drivers/spi/spi-npcm-fiu.c ++++ b/drivers/spi/spi-npcm-fiu.c +@@ -334,8 +334,9 @@ static int npcm_fiu_uma_read(struct spi_mem *mem, + uma_cfg |= ilog2(op->cmd.buswidth); + uma_cfg |= ilog2(op->addr.buswidth) + << NPCM_FIU_UMA_CFG_ADBPCK_SHIFT; +- uma_cfg |= ilog2(op->dummy.buswidth) +- << NPCM_FIU_UMA_CFG_DBPCK_SHIFT; ++ if (op->dummy.nbytes) ++ uma_cfg |= ilog2(op->dummy.buswidth) ++ << NPCM_FIU_UMA_CFG_DBPCK_SHIFT; + uma_cfg |= ilog2(op->data.buswidth) + << NPCM_FIU_UMA_CFG_RDBPCK_SHIFT; + uma_cfg |= op->dummy.nbytes << NPCM_FIU_UMA_CFG_DBSIZ_SHIFT; +-- +2.42.0 +