[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1006149: linux-image-5.16.0-1-686: Fails to boot on T41 Thinkpads



On 4/4/22 14:42, Axel Beckert wrote:
Hi Damien,

Damien Le Moal wrote:
I will send a patch to blacklist read log for that drive later today, to
try. If that patch works, I will queue it and cc stable so that it gets
backported.

I assume this still requires recompilation as this blacklist is
probably compiled into the kernel and not just a file in the
initramfs.

Correct. You will need to compile and install a kernel. Can you do
that ?

Theoretically yes, but I actually have no idea how to cross-compile a
kernel package from amd64 to i386.

And I suspect that compiling the Debian kernel package on the device
itself will run out of resources with only 1 GB of RAM or at least
take ages (single-core Pentium 4 Mobile with 1.8 GHz). But I can try.
(Failed to test the last patch due to not finding time, though.)

		Regards, Axel

Second patch to try attached. This one is "the big hammer" that disables the use of read log commands for the adapter.

Please try this patch independently of the previous one I sent, meaning that you need to rebuild a kernel from clean code (unpatched source).

--
Damien Le Moal
Western Digital Research
From 08a00244fc75b184a894be5b29aeaaa3ba7ad117 Mon Sep 17 00:00:00 2001
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Date: Mon, 4 Apr 2022 14:57:20 +0900
Subject: [PATCH] ata: ata_piix: Disable read log on Thinkpad ICH4

Intel ICH4 on the IBM ThinkPad A/T/X Series of laptop seems to react
badly to read log commands. Introduce the ich_pata_100_nolog descriptor
to add the ATA_FLAG_NO_LOG_PAGE flag for this adapter to disable the use
of the read log command.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/ata/ata_piix.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ade5e894563b..5d8f028f102c 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -124,6 +124,7 @@ enum piix_controller_ids {
 	ich_pata_33,		/* ICH up to UDMA 33 only */
 	ich_pata_66,		/* ICH up to 66 Mhz */
 	ich_pata_100,		/* ICH up to UDMA 100 */
+	ich_pata_100_nolog,	/* ICH up to UDMA 100, no read log */
 	ich_pata_100_nomwdma1,	/* ICH up to UDMA 100 but with no MWDMA1*/
 	ich5_sata,
 	ich6_sata,
@@ -183,6 +184,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
 	/* Intel ICH4 (i845GV, i845E, i852, i855) UDMA 100 */
 	{ 0x8086, 0x24CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	{ 0x8086, 0x24CB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+	/* Intel ICH4 on IBM ThinkPad A/T/X Series */
+	{ 0x8086, 0x24CA, 0x1014, 0x0220, 0, 0, ich_pata_100_nolog },
 	/* Intel ICH5 */
 	{ 0x8086, 0x24DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	/* C-ICH (i810E2) */
@@ -1153,6 +1156,16 @@ static struct ata_port_info piix_port_info[] = {
 		.port_ops	= &ich_pata_ops,
 	},
 
+	[ich_pata_100_nolog] =
+	{
+		.flags		= PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR |
+				  ATA_FLAG_NO_LOG_PAGE,
+		.pio_mask	= ATA_PIO4,
+		.mwdma_mask	= ATA_MWDMA12_ONLY,
+		.udma_mask	= ATA_UDMA5,
+		.port_ops	= &ich_pata_ops,
+	},
+
 	[ich_pata_100_nomwdma1] =
 	{
 		.flags		= PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR,
-- 
2.35.1


Reply to: