--- /dev/null
+From 3ef600923521616ebe192c893468ad0424de2afb Mon Sep 17 00:00:00 2001
+From: Niklas Cassel <niklas.cassel@wdc.com>
+Date: Mon, 18 Sep 2023 22:24:50 +0200
+Subject: ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
+
+From: Niklas Cassel <niklas.cassel@wdc.com>
+
+commit 3ef600923521616ebe192c893468ad0424de2afb upstream.
+
+For REPORT SUPPORTED OPERATION CODES command, the service action field is
+defined as bits 0-4 in the second byte in the CDB. Bits 5-7 in the second
+byte are reserved.
+
+Only look at the service action field in the second byte when determining
+if the MAINTENANCE IN opcode is a REPORT SUPPORTED OPERATION CODES command.
+
+This matches how we only look at the service action field in the second
+byte when determining if the SERVICE ACTION IN(16) opcode is a READ
+CAPACITY(16) command (reserved bits 5-7 in the second byte are ignored).
+
+Fixes: 7b2030942859 ("libata: Add support for SCT Write Same")
+Cc: stable@vger.kernel.org
+Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/ata/libata-scsi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -4562,7 +4562,7 @@ void ata_scsi_simulate(struct ata_device
+ break;
+
+ case MAINTENANCE_IN:
+- if (scsicmd[1] == MI_REPORT_SUPPORTED_OPERATION_CODES)
++ if ((scsicmd[1] & 0x1f) == MI_REPORT_SUPPORTED_OPERATION_CODES)
+ ata_scsi_rbuf_fill(&args, ata_scsiop_maint_in);
+ else
+ ata_scsi_set_invalid_field(dev, cmd, 1, 0xff);
--- /dev/null
+From 3914784553f68c931fc666dbe7e86fe881aada38 Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1@gmail.com>
+Date: Thu, 14 Sep 2023 23:08:44 +0200
+Subject: i2c: i801: unregister tco_pdev in i801_probe() error path
+
+From: Heiner Kallweit <hkallweit1@gmail.com>
+
+commit 3914784553f68c931fc666dbe7e86fe881aada38 upstream.
+
+We have to unregister tco_pdev also if i2c_add_adapter() fails.
+
+Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
+Cc: stable@vger.kernel.org
+Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
+Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Reviewed-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-i801.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/i2c/busses/i2c-i801.c
++++ b/drivers/i2c/busses/i2c-i801.c
+@@ -1670,6 +1670,7 @@ static int i801_probe(struct pci_dev *de
+ "SMBus I801 adapter at %04lx", priv->smba);
+ err = i2c_add_adapter(&priv->adapter);
+ if (err) {
++ platform_device_unregister(priv->tco_pdev);
+ i801_acpi_remove(priv);
+ return err;
+ }
watchdog-itco_wdt-set-no_reboot-if-the-watchdog-is-n.patch
serial-8250_port-check-irq-data-before-use.patch
nilfs2-fix-potential-use-after-free-in-nilfs_gccache_submit_read_data.patch
+ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch
+i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch