From: Greg Kroah-Hartman Date: Wed, 4 Oct 2023 14:36:45 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v6.5.6~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2649daea1e6c738ee768679db20ef459f8450fe9;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch --- diff --git a/queue-4.14/ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch b/queue-4.14/ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch new file mode 100644 index 00000000000..ae9403f8c3b --- /dev/null +++ b/queue-4.14/ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch @@ -0,0 +1,40 @@ +From 3ef600923521616ebe192c893468ad0424de2afb Mon Sep 17 00:00:00 2001 +From: Niklas Cassel +Date: Mon, 18 Sep 2023 22:24:50 +0200 +Subject: ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES + +From: Niklas Cassel + +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 +Signed-off-by: Damien Le Moal +Signed-off-by: Greg Kroah-Hartman +--- + 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); diff --git a/queue-4.14/i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch b/queue-4.14/i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch new file mode 100644 index 00000000000..698c195dde6 --- /dev/null +++ b/queue-4.14/i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch @@ -0,0 +1,32 @@ +From 3914784553f68c931fc666dbe7e86fe881aada38 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 14 Sep 2023 23:08:44 +0200 +Subject: i2c: i801: unregister tco_pdev in i801_probe() error path + +From: Heiner Kallweit + +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 +Reviewed-by: Mika Westerberg +Reviewed-by: Jean Delvare +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } diff --git a/queue-4.14/series b/queue-4.14/series index 8605436d60c..1d780702442 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -21,3 +21,5 @@ watchdog-itco_wdt-no-need-to-stop-the-timer-in-probe.patch 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