--- /dev/null
+From eb09074bdb05ffd6bfe77f8b4a41b76ef78c997b Mon Sep 17 00:00:00 2001
+From: Werner Sembach <wse@tuxedocomputers.com>
+Date: Wed, 12 Jul 2023 11:56:51 -0700
+Subject: Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
+
+From: Werner Sembach <wse@tuxedocomputers.com>
+
+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 <wse@tuxedocomputers.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20230607173331.851192-1-wse@tuxedocomputers.com
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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"),
--- /dev/null
+From 579c7e41507e85dc3eedf998a3dca14a2a1526ad Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+Date: Fri, 4 Aug 2023 12:15:34 -0700
+Subject: Revert "f2fs: clean up w/ sbi->log_sectors_per_block"
+
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+
+commit 579c7e41507e85dc3eedf998a3dca14a2a1526ad upstream.
+
+This reverts commit bfd476623999118d9c509cb0fa9380f2912bc225.
+
+Shinichiro Kawasaki reported:
+
+When I ran workloads on f2fs using v6.5-rcX with fixes [1][2] and a zoned block
+devices with 4kb logical block size, I observe mount failure as follows. When
+I revert this commit, the failure goes away.
+
+[ 167.781975][ T1555] F2FS-fs (dm-0): IO Block Size: 4 KB
+[ 167.890728][ T1555] F2FS-fs (dm-0): Found nat_bits in checkpoint
+[ 171.482588][ T1555] F2FS-fs (dm-0): Zone without valid block has non-zero write pointer. Reset the write pointer: wp[0x1300,0x8]
+[ 171.496000][ T1555] F2FS-fs (dm-0): (0) : Unaligned zone reset attempted (block 280000 + 80000)
+[ 171.505037][ T1555] F2FS-fs (dm-0): Discard zone failed: (errno=-5)
+
+The patch replaced "sbi->log_blocksize - SECTOR_SHIFT" with
+"sbi->log_sectors_per_block". However, I think these two are not equal when the
+device has 4k logical block size. The former uses Linux kernel sector size 512
+byte. The latter use 512b sector size or 4kb sector size depending on the
+device. mkfs.f2fs obtains logical block size via BLKSSZGET ioctl from the device
+and reflects it to the value sbi->log_sector_size_per_block. This causes
+unexpected write pointer calculations in check_zone_write_pointer(). This
+resulted in unexpected zone reset and the mount failure.
+
+[1] https://lkml.kernel.org/linux-f2fs-devel/20230711050101.GA19128@lst.de/
+[2] https://lore.kernel.org/linux-f2fs-devel/20230804091556.2372567-1-shinichiro.kawasaki@wdc.com/
+
+Cc: stable@vger.kernel.org
+Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
+Fixes: bfd476623999 ("f2fs: clean up w/ sbi->log_sectors_per_block")
+Reviewed-by: Chao Yu <chao@kernel.org>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/f2fs/segment.c | 23 ++++++++++++-----------
+ 1 file changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
+index 0457d620011f..cbb4bd95ea19 100644
+--- a/fs/f2fs/segment.c
++++ b/fs/f2fs/segment.c
+@@ -4846,17 +4846,17 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi,
+ {
+ unsigned int wp_segno, wp_blkoff, zone_secno, zone_segno, segno;
+ block_t zone_block, wp_block, last_valid_block;
++ unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT;
+ int i, s, b, ret;
+ struct seg_entry *se;
+
+ if (zone->type != BLK_ZONE_TYPE_SEQWRITE_REQ)
+ return 0;
+
+- wp_block = fdev->start_blk + (zone->wp >> sbi->log_sectors_per_block);
++ wp_block = fdev->start_blk + (zone->wp >> log_sectors_per_block);
+ wp_segno = GET_SEGNO(sbi, wp_block);
+ wp_blkoff = wp_block - START_BLOCK(sbi, wp_segno);
+- zone_block = fdev->start_blk + (zone->start >>
+- sbi->log_sectors_per_block);
++ zone_block = fdev->start_blk + (zone->start >> log_sectors_per_block);
+ zone_segno = GET_SEGNO(sbi, zone_block);
+ zone_secno = GET_SEC_FROM_SEG(sbi, zone_segno);
+
+@@ -4906,7 +4906,7 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi,
+ "pointer. Reset the write pointer: wp[0x%x,0x%x]",
+ wp_segno, wp_blkoff);
+ ret = __f2fs_issue_discard_zone(sbi, fdev->bdev, zone_block,
+- zone->len >> sbi->log_sectors_per_block);
++ zone->len >> log_sectors_per_block);
+ if (ret)
+ f2fs_err(sbi, "Discard zone failed: %s (errno=%d)",
+ fdev->path, ret);
+@@ -4967,6 +4967,7 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
+ struct blk_zone zone;
+ unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off;
+ block_t cs_zone_block, wp_block;
++ unsigned int log_sectors_per_block = sbi->log_blocksize - SECTOR_SHIFT;
+ sector_t zone_sector;
+ int err;
+
+@@ -4978,8 +4979,8 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
+ return 0;
+
+ /* report zone for the sector the curseg points to */
+- zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) <<
+- sbi->log_sectors_per_block;
++ zone_sector = (sector_t)(cs_zone_block - zbd->start_blk)
++ << log_sectors_per_block;
+ err = blkdev_report_zones(zbd->bdev, zone_sector, 1,
+ report_one_zone_cb, &zone);
+ if (err != 1) {
+@@ -4991,10 +4992,10 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
+ if (zone.type != BLK_ZONE_TYPE_SEQWRITE_REQ)
+ return 0;
+
+- wp_block = zbd->start_blk + (zone.wp >> sbi->log_sectors_per_block);
++ wp_block = zbd->start_blk + (zone.wp >> log_sectors_per_block);
+ wp_segno = GET_SEGNO(sbi, wp_block);
+ wp_blkoff = wp_block - START_BLOCK(sbi, wp_segno);
+- wp_sector_off = zone.wp & GENMASK(sbi->log_sectors_per_block - 1, 0);
++ wp_sector_off = zone.wp & GENMASK(log_sectors_per_block - 1, 0);
+
+ if (cs->segno == wp_segno && cs->next_blkoff == wp_blkoff &&
+ wp_sector_off == 0)
+@@ -5021,8 +5022,8 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
+ if (!zbd)
+ return 0;
+
+- zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) <<
+- sbi->log_sectors_per_block;
++ zone_sector = (sector_t)(cs_zone_block - zbd->start_blk)
++ << log_sectors_per_block;
+ err = blkdev_report_zones(zbd->bdev, zone_sector, 1,
+ report_one_zone_cb, &zone);
+ if (err != 1) {
+@@ -5040,7 +5041,7 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
+ "Reset the zone: curseg[0x%x,0x%x]",
+ type, cs->segno, cs->next_blkoff);
+ err = __f2fs_issue_discard_zone(sbi, zbd->bdev, cs_zone_block,
+- zone.len >> sbi->log_sectors_per_block);
++ zone.len >> log_sectors_per_block);
+ if (err) {
+ f2fs_err(sbi, "Discard zone failed: %s (errno=%d)",
+ zbd->path, err);
+--
+2.42.0
+
--- /dev/null
+From 91ec6c85599b60c00caf4e9a9d6c4d6e5dd5e93c Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+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 <mszeredi@redhat.com>
+
+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" <j@bitron.ch>
+Cc: <stable@vger.kernel.org> # v6.3
+Link: https://lore.kernel.org/all/4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch/
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/file.c | 89 ++++++++++++++++-----------------------------------------
+ 1 file changed, 26 insertions(+), 63 deletions(-)
+
+--- a/fs/fuse/file.c
++++ b/fs/fuse/file.c
+@@ -19,7 +19,6 @@
+ #include <linux/uio.h>
+ #include <linux/fs.h>
+ #include <linux/filelock.h>
+-#include <linux/file.h>
+
+ 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 inod
+ 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 @@ inval_attr_out:
+ */
+ 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)
+ {
--- /dev/null
+From ebfde1584d9f037b6309fc682c96e22dac7bcb7a Mon Sep 17 00:00:00 2001
+From: Vidya Sagar <vidyas@nvidia.com>
+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 <vidyas@nvidia.com>
+
+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 <vidyas@nvidia.com>
+Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
+Acked-by: Jon Hunter <jonathanh@nvidia.com>
+Cc: stable@vger.kernel.org # v6.0-rc1+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -900,11 +900,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);
+@@ -1887,11 +1882,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 +
tpm-enable-hwrng-only-for-pluton-on-amd-cpus.patch
net-avoid-address-overwrite-in-kernel_connect.patch
bluetooth-btrtl-load-fw-v2-otherwise-fw-v1-for-rtl8852c.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-f2fs-clean-up-w-sbi-log_sectors_per_block.patch
+revert-pci-tegra194-enable-support-for-256-byte-payload.patch