Skip to contentSkip to conversation

FAILED: patch "[PATCH] ata: sata_inic162x: remove dangerous broken driver" failed to apply to 6.18-stable tree

PATCH New Sasha Levin 1 participant 3 messages Nov 7 – Nov 10

Subsystems (2)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

The patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 96fdeb7e3fd8d937f8351ed90824c9d904e590a1
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'

Thanks,
Sasha

------------------ original commit in Linus's tree ------------------

From 96fdeb7e3fd8d937f8351ed90824c9d904e590a1 Mon Sep 17 00:00:00 2001
From: Ethan Nelson-Moore <[email protected]>
Date: Mon, 14 Sep 2026 18:47:09 -0700
Subject: [PATCH] ata: sata_inic162x: remove dangerous broken driver

The sata_inic162x driver was labeled as "very experimental" in commit bb9696192826 ("libata: make it clear that sata_inic162x is experimental") due to data corruption issues, but not marked as broken. Since then, no changes have been made to it that could fix these issues. Since the driver was not marked as broken, and the message about potential data corruption is only visible in the code and dmesg, it is possible that someone could enable the driver without realizing its potential for data corruption. Remove the driver to protect users' data.

Fixes 1fd7a697a37b ("sata_inic162x: finally, driver for initio 162x SATA controllers, take #2")
---
 drivers/ata/Kconfig         |   7 -
 drivers/ata/Makefile        |   1 -
 drivers/ata/sata_inic162x.c | 903 ------------------------------------
 3 files changed, 911 deletions(-)
 delete mode 100644 drivers/ata/sata_inic162x.c
drivers/ata/Kconfig +0 -7
index 86af89a9bfce6..9704ed688775b 100644
@@ -328,13 +328,6 @@ config SATA_AHCI_SEATTLE
 
 	 If unsure, say N
 
-config SATA_INIC162X
-	tristate "Initio 162x SATA support (Very Experimental)"
-	depends on PCI
-	select SATA_HOST
-	help
-	  This option enables support for Initio 162x Serial ATA.
-
 config SATA_ACARD_AHCI
 	tristate "ACard AHCI variant (ATP 8620)"
 	depends on PCI
drivers/ata/Makefile +0 -1
index 647e3d4b6f758..20b400aea0c45 100644
@@ -11,7 +11,6 @@ obj-$(CONFIG_SATA_AHCI_SEATTLE)	+= ahci_seattle.o libahci.o libahci_platform.o
 obj-$(CONFIG_SATA_AHCI_PLATFORM) += ahci_platform.o libahci.o libahci_platform.o
 obj-$(CONFIG_SATA_FSL)		+= sata_fsl.o
 obj-$(CONFIG_SATA_GEMINI)	+= sata_gemini.o
-obj-$(CONFIG_SATA_INIC162X)	+= sata_inic162x.o
 obj-$(CONFIG_SATA_SIL24)	+= sata_sil24.o
 obj-$(CONFIG_SATA_DWC)		+= sata_dwc_460ex.o
 obj-$(CONFIG_SATA_HIGHBANK)	+= sata_highbank.o libahci.o
drivers/ata/sata_inic162x.c deleted +0 -903

903 lines not on this page · raw message

Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/2 ata: libata: Add an argument to ata_eh_reset()

From: Bart Van Assche <[email protected]>

[ Upstream commit 4b3c2ca268b0a66093793466e02d8566d642f19c ]

Pass the ATA port pointer as first argument to ata_eh_reset(). No functionality has been changed. This patch prepares for enabling lock context analysis. Without this patch, lockdep_assert_held() statements would have to be added before each ata_eh_reset() call because the compiler doesn't know that ap->link.p == ap. See also ata_link_init().

Stable-dep-of: 96fdeb7e3fd8 ("ata: sata_inic162x: remove dangerous broken driver")

---
 drivers/ata/libata-eh.c  | 6 +++---
 drivers/ata/libata-pmp.c | 2 +-
 drivers/ata/libata.h     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/ata/libata-eh.c +3 -3
index f21efb0f6419f..9d35b4f8d3929 100644
@@ -2812,10 +2812,9 @@ static bool ata_eh_followup_srst_needed(struct ata_link *link, int rc)
 	return false;
 }
 
-int ata_eh_reset(struct ata_link *link, int classify,
+int ata_eh_reset(struct ata_port *ap, struct ata_link *link, int classify,
 		 struct ata_reset_operations *reset_ops)
 {
-	struct ata_port *ap = link->ap;
 	struct ata_link *slave = ap->slave_link;
 	struct ata_eh_context *ehc = &link->eh_context;
 	struct ata_eh_context *sehc = slave ? &slave->eh_context : NULL;
@@ -3863,7 +3862,8 @@ int ata_eh_recover(struct ata_port *ap, struct ata_reset_operations *reset_ops,
 		if (!(ehc->i.action & ATA_EH_RESET))
 			continue;
 
-		rc = ata_eh_reset(link, ata_link_nr_vacant(link), reset_ops);
+		rc = ata_eh_reset(ap, link, ata_link_nr_vacant(link),
+				  reset_ops);
 		if (rc) {
 			ata_link_err(link, "reset failed, giving up\n");
 			goto out;
drivers/ata/libata-pmp.c +1 -1
index 99c67dbfb7536..c3b3af28d17c9 100644
@@ -796,7 +796,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
 		struct ata_link *tlink;
 
 		/* reset */
-		rc = ata_eh_reset(link, 0, reset_ops);
+		rc = ata_eh_reset(ap, link, 0, reset_ops);
 		if (rc) {
 			ata_link_err(link, "failed to reset PMP, giving up\n");
 			goto fail;
drivers/ata/libata.h +2 -2
index 9f96ca2acfd90..506a649b73d58 100644
@@ -192,8 +192,8 @@ extern void ata_eh_done(struct ata_link *link, struct ata_device *dev,
 extern void ata_eh_autopsy(struct ata_port *ap);
 const char *ata_get_cmd_name(u8 command);
 extern void ata_eh_report(struct ata_port *ap);
-extern int ata_eh_reset(struct ata_link *link, int classify,
-			struct ata_reset_operations *reset_ops);
+extern int ata_eh_reset(struct ata_port *ap, struct ata_link *link,
+			int classify, struct ata_reset_operations *reset_ops);
 extern int ata_eh_recover(struct ata_port *ap,
 			  struct ata_reset_operations *reset_ops,
 			  struct ata_link **r_failed_disk);
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 2/2 ata: sata_inic162x: remove dangerous broken driver

From: Ethan Nelson-Moore <[email protected]>

[ Upstream commit 96fdeb7e3fd8d937f8351ed90824c9d904e590a1 ]

The sata_inic162x driver was labeled as "very experimental" in commit bb9696192826 ("libata: make it clear that sata_inic162x is experimental") due to data corruption issues, but not marked as broken. Since then, no changes have been made to it that could fix these issues. Since the driver was not marked as broken, and the message about potential data corruption is only visible in the code and dmesg, it is possible that someone could enable the driver without realizing its potential for data corruption. Remove the driver to protect users' data.

Fixes 1fd7a697a37b ("sata_inic162x: finally, driver for initio 162x SATA controllers, take #2")
[ sashal: adapted whole-file deletion to account for the missing __must_hold() annotation on inic_error_handler() ]
---
 drivers/ata/Kconfig         |   7 -
 drivers/ata/Makefile        |   1 -
 drivers/ata/sata_inic162x.c | 902 ------------------------------------
 3 files changed, 910 deletions(-)
 delete mode 100644 drivers/ata/sata_inic162x.c
drivers/ata/Kconfig +0 -7
index 120a2b7067fc7..ff81f707d0b23 100644
@@ -329,13 +329,6 @@ config SATA_AHCI_SEATTLE
 
 	 If unsure, say N
 
-config SATA_INIC162X
-	tristate "Initio 162x SATA support (Very Experimental)"
-	depends on PCI
-	select SATA_HOST
-	help
-	  This option enables support for Initio 162x Serial ATA.
-
 config SATA_ACARD_AHCI
 	tristate "ACard AHCI variant (ATP 8620)"
 	depends on PCI
drivers/ata/Makefile +0 -1
index 20e6645ab7371..81e04e96b807e 100644
@@ -9,7 +9,6 @@ obj-$(CONFIG_SATA_AHCI_SEATTLE)	+= ahci_seattle.o libahci.o libahci_platform.o
 obj-$(CONFIG_SATA_AHCI_PLATFORM) += ahci_platform.o libahci.o libahci_platform.o
 obj-$(CONFIG_SATA_FSL)		+= sata_fsl.o
 obj-$(CONFIG_SATA_GEMINI)	+= sata_gemini.o
-obj-$(CONFIG_SATA_INIC162X)	+= sata_inic162x.o
 obj-$(CONFIG_SATA_SIL24)	+= sata_sil24.o
 obj-$(CONFIG_SATA_DWC)		+= sata_dwc_460ex.o
 obj-$(CONFIG_SATA_HIGHBANK)	+= sata_highbank.o libahci.o
drivers/ata/sata_inic162x.c deleted +0 -902

902 lines not on this page · raw message

Signature · 1 line
2.53.0