From: Greg Kroah-Hartman Date: Thu, 7 Sep 2023 15:05:33 +0000 (+0100) Subject: 6.4-stable patches X-Git-Tag: v6.1.53~125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=690558106728e77f699a86bf009e9842ee843176;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: input-i8042-add-quirk-for-tuxedo-gemini-17-gen1-clevo-pd70pn.patch revert-fuse-in-fuse_flush-only-wait-if-someone-wants-the-return-code.patch revert-pci-tegra194-enable-support-for-256-byte-payload.patch --- diff --git a/queue-6.4/input-i8042-add-quirk-for-tuxedo-gemini-17-gen1-clevo-pd70pn.patch b/queue-6.4/input-i8042-add-quirk-for-tuxedo-gemini-17-gen1-clevo-pd70pn.patch new file mode 100644 index 00000000000..3e3c34de2d0 --- /dev/null +++ b/queue-6.4/input-i8042-add-quirk-for-tuxedo-gemini-17-gen1-clevo-pd70pn.patch @@ -0,0 +1,45 @@ +From eb09074bdb05ffd6bfe77f8b4a41b76ef78c997b Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Wed, 12 Jul 2023 11:56:51 -0700 +Subject: Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN + +From: Werner Sembach + +commit eb09074bdb05ffd6bfe77f8b4a41b76ef78c997b upstream. + +The touchpad of this device is both connected via PS/2 and i2c. This causes +strange behavior when both driver fight for control. The easy fix is to +prevent the PS/2 driver from accessing the mouse port as the full feature +set of the touchpad is only supported in the i2c interface anyway. + +The strange behavior in this case is, that when an external screen is +connected and the notebook is closed, the pointer on the external screen is +moving to the lower right corner. When the notebook is opened again, this +movement stops, but the touchpad clicks are unresponsive afterwards until +reboot. + +Signed-off-by: Werner Sembach +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20230607173331.851192-1-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1281,6 +1281,13 @@ static const struct dmi_system_id i8042_ + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, ++ /* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */ ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "PD5x_7xPNP_PNR_PNN_PNT"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOAUX) ++ }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "X170SM"), diff --git a/queue-6.4/revert-fuse-in-fuse_flush-only-wait-if-someone-wants-the-return-code.patch b/queue-6.4/revert-fuse-in-fuse_flush-only-wait-if-someone-wants-the-return-code.patch new file mode 100644 index 00000000000..d68ce33a486 --- /dev/null +++ b/queue-6.4/revert-fuse-in-fuse_flush-only-wait-if-someone-wants-the-return-code.patch @@ -0,0 +1,173 @@ +From 91ec6c85599b60c00caf4e9a9d6c4d6e5dd5e93c Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Mon, 14 Aug 2023 13:05:30 +0200 +Subject: Revert "fuse: in fuse_flush only wait if someone wants the return code" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Miklos Szeredi + +commit 91ec6c85599b60c00caf4e9a9d6c4d6e5dd5e93c upstream. + +This reverts commit 5a8bee63b10f6f2f52f6d22e109a4a147409842a. + +Jürg Billeter reports the following regression: + + Since v6.3-rc1 commit 5a8bee63b1 ("fuse: in fuse_flush only wait if + someone wants the return code") `fput()` is called asynchronously if a + file is closed as part of a process exiting, i.e., if there was no + explicit `close()` before exit. + + If the file was open for writing, also `put_write_access()` is called + asynchronously as part of the async `fput()`. + + If that newly written file is an executable, attempting to `execve()` the + new file can fail with `ETXTBSY` if it's called after the writer process + exited but before the async `fput()` has run. + +Reported-and-tested-by: "Jürg Billeter" +Cc: # v6.3 +Link: https://lore.kernel.org/all/4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch/ +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman +--- + fs/fuse/file.c | 89 +++++++++++++++----------------------------------- + 1 file changed, 26 insertions(+), 63 deletions(-) + +diff --git a/fs/fuse/file.c b/fs/fuse/file.c +index bc4115288eec..1c7599ed9062 100644 +--- a/fs/fuse/file.c ++++ b/fs/fuse/file.c +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + + static int fuse_send_open(struct fuse_mount *fm, u64 nodeid, + unsigned int open_flags, int opcode, +@@ -479,36 +478,48 @@ static void fuse_sync_writes(struct inode *inode) + fuse_release_nowrite(inode); + } + +-struct fuse_flush_args { +- struct fuse_args args; +- struct fuse_flush_in inarg; +- struct work_struct work; +- struct file *file; +-}; +- +-static int fuse_do_flush(struct fuse_flush_args *fa) ++static int fuse_flush(struct file *file, fl_owner_t id) + { +- int err; +- struct inode *inode = file_inode(fa->file); ++ struct inode *inode = file_inode(file); + struct fuse_mount *fm = get_fuse_mount(inode); ++ struct fuse_file *ff = file->private_data; ++ struct fuse_flush_in inarg; ++ FUSE_ARGS(args); ++ int err; ++ ++ if (fuse_is_bad(inode)) ++ return -EIO; ++ ++ if (ff->open_flags & FOPEN_NOFLUSH && !fm->fc->writeback_cache) ++ return 0; + + err = write_inode_now(inode, 1); + if (err) +- goto out; ++ return err; + + inode_lock(inode); + fuse_sync_writes(inode); + inode_unlock(inode); + +- err = filemap_check_errors(fa->file->f_mapping); ++ err = filemap_check_errors(file->f_mapping); + if (err) +- goto out; ++ return err; + + err = 0; + if (fm->fc->no_flush) + goto inval_attr_out; + +- err = fuse_simple_request(fm, &fa->args); ++ memset(&inarg, 0, sizeof(inarg)); ++ inarg.fh = ff->fh; ++ inarg.lock_owner = fuse_lock_owner_id(fm->fc, id); ++ args.opcode = FUSE_FLUSH; ++ args.nodeid = get_node_id(inode); ++ args.in_numargs = 1; ++ args.in_args[0].size = sizeof(inarg); ++ args.in_args[0].value = &inarg; ++ args.force = true; ++ ++ err = fuse_simple_request(fm, &args); + if (err == -ENOSYS) { + fm->fc->no_flush = 1; + err = 0; +@@ -521,57 +532,9 @@ static int fuse_do_flush(struct fuse_flush_args *fa) + */ + if (!err && fm->fc->writeback_cache) + fuse_invalidate_attr_mask(inode, STATX_BLOCKS); +- +-out: +- fput(fa->file); +- kfree(fa); + return err; + } + +-static void fuse_flush_async(struct work_struct *work) +-{ +- struct fuse_flush_args *fa = container_of(work, typeof(*fa), work); +- +- fuse_do_flush(fa); +-} +- +-static int fuse_flush(struct file *file, fl_owner_t id) +-{ +- struct fuse_flush_args *fa; +- struct inode *inode = file_inode(file); +- struct fuse_mount *fm = get_fuse_mount(inode); +- struct fuse_file *ff = file->private_data; +- +- if (fuse_is_bad(inode)) +- return -EIO; +- +- if (ff->open_flags & FOPEN_NOFLUSH && !fm->fc->writeback_cache) +- return 0; +- +- fa = kzalloc(sizeof(*fa), GFP_KERNEL); +- if (!fa) +- return -ENOMEM; +- +- fa->inarg.fh = ff->fh; +- fa->inarg.lock_owner = fuse_lock_owner_id(fm->fc, id); +- fa->args.opcode = FUSE_FLUSH; +- fa->args.nodeid = get_node_id(inode); +- fa->args.in_numargs = 1; +- fa->args.in_args[0].size = sizeof(fa->inarg); +- fa->args.in_args[0].value = &fa->inarg; +- fa->args.force = true; +- fa->file = get_file(file); +- +- /* Don't wait if the task is exiting */ +- if (current->flags & PF_EXITING) { +- INIT_WORK(&fa->work, fuse_flush_async); +- schedule_work(&fa->work); +- return 0; +- } +- +- return fuse_do_flush(fa); +-} +- + int fuse_fsync_common(struct file *file, loff_t start, loff_t end, + int datasync, int opcode) + { +-- +2.42.0 + diff --git a/queue-6.4/revert-pci-tegra194-enable-support-for-256-byte-payload.patch b/queue-6.4/revert-pci-tegra194-enable-support-for-256-byte-payload.patch new file mode 100644 index 00000000000..91f757ae2ef --- /dev/null +++ b/queue-6.4/revert-pci-tegra194-enable-support-for-256-byte-payload.patch @@ -0,0 +1,76 @@ +From ebfde1584d9f037b6309fc682c96e22dac7bcb7a Mon Sep 17 00:00:00 2001 +From: Vidya Sagar +Date: Mon, 19 Jun 2023 15:56:04 +0530 +Subject: Revert "PCI: tegra194: Enable support for 256 Byte payload" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Vidya Sagar + +commit ebfde1584d9f037b6309fc682c96e22dac7bcb7a upstream. + +After commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte +payload"), we initialize MPS=256 for tegra194 Root Ports before enumerating +the hierarchy. + +Consider an Endpoint that supports only MPS=128. In the default situation +(CONFIG_PCIE_BUS_DEFAULT set and no "pci=pcie_bus_*" parameter), Linux +tries to configure the MPS of every device to match the upstream bridge. +If the Endpoint is directly below the Root Port, Linux can reduce the Root +Port MPS to 128 to match the Endpoint. But if there's a switch in the +middle, Linux doesn't reduce the Root Port MPS because other devices below +the switch may already be configured with MPS larger than 128. + +This scenario results in uncorrectable Malformed TLP errors if the Root +Port sends TLPs with payloads larger than 128 bytes. These errors can +be avoided by using the "pci=pcie_bus_safe" parameter, but it doesn't +seem to be a good idea to always have this parameter even for basic +functionality to work. + +Revert commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte +payload") so the Root Ports default to MPS=128, which all devices +support. + +If peer-to-peer DMA is not required, one can use "pci=pcie_bus_perf" to +get the benefit of larger MPS settings. + +[bhelgaas: commit log; kwilczynski: retain "u16 val_16" declaration at +the top, add missing acked by tag] +Fixes: 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte payload") +Link: https://lore.kernel.org/linux-pci/20230619102604.3735001-1-vidyas@nvidia.com +Signed-off-by: Vidya Sagar +Signed-off-by: Krzysztof Wilczyński +Acked-by: Jon Hunter +Cc: stable@vger.kernel.org # v6.0-rc1+ +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/controller/dwc/pcie-tegra194.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/drivers/pci/controller/dwc/pcie-tegra194.c ++++ b/drivers/pci/controller/dwc/pcie-tegra194.c +@@ -883,11 +883,6 @@ static int tegra_pcie_dw_host_init(struc + pcie->pcie_cap_base = dw_pcie_find_capability(&pcie->pci, + PCI_CAP_ID_EXP); + +- val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_DEVCTL); +- val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD; +- val_16 |= PCI_EXP_DEVCTL_PAYLOAD_256B; +- dw_pcie_writew_dbi(pci, pcie->pcie_cap_base + PCI_EXP_DEVCTL, val_16); +- + val = dw_pcie_readl_dbi(pci, PCI_IO_BASE); + val &= ~(IO_BASE_IO_DECODE | IO_BASE_IO_DECODE_BIT8); + dw_pcie_writel_dbi(pci, PCI_IO_BASE, val); +@@ -1876,11 +1871,6 @@ static void pex_ep_event_pex_rst_deasser + pcie->pcie_cap_base = dw_pcie_find_capability(&pcie->pci, + PCI_CAP_ID_EXP); + +- val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_DEVCTL); +- val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD; +- val_16 |= PCI_EXP_DEVCTL_PAYLOAD_256B; +- dw_pcie_writew_dbi(pci, pcie->pcie_cap_base + PCI_EXP_DEVCTL, val_16); +- + /* Clear Slot Clock Configuration bit if SRNS configuration */ + if (pcie->enable_srns) { + val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + diff --git a/queue-6.4/series b/queue-6.4/series index 927dc55f12a..c5d577151b7 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -90,3 +90,6 @@ kvm-x86-mmu-add-never-option-to-allow-sticky-disabling-of-nx_huge_pages.patch net-avoid-address-overwrite-in-kernel_connect.patch bluetooth-btrtl-load-fw-v2-otherwise-fw-v1-for-rtl8852c.patch drm-amd-display-ensure-async-flips-are-only-accepted-for-fast-updates.patch +input-i8042-add-quirk-for-tuxedo-gemini-17-gen1-clevo-pd70pn.patch +revert-fuse-in-fuse_flush-only-wait-if-someone-wants-the-return-code.patch +revert-pci-tegra194-enable-support-for-256-byte-payload.patch