Skip to contentSkip to conversation

READ LOG DMA EXT failed, trying unqueued

DISCUSSION Sergey Senozhatsky 2 participants 5 messages May 19, 2015 libata

lore
Share & tools
lore
#0 lore raw

Hello,

my laptop doesn't boot anymore, spinning in "READ LOG DMA EXT failed, trying unqueued". any reason it loops forever?

	-ss
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sergey" == Sergey Senozhatsky <[email protected]> writes:

Sergey> Hello, my laptop doesn't boot anymore, spinning in "READ LOG DMA Sergey> EXT failed, trying unqueued". any reason it loops forever?

Does the patch below help?

Also, please let us know which drive you have and send us the output of:

# smartctl -l gplog,0x13 /dev/sdN

Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
drivers/ata/libata-eh.c +1 -0
index 2893563d0537..2b370ee0ae86 100644
@@ -1521,6 +1521,7 @@ retry:
 	} else {
 		tf.command = ATA_CMD_READ_LOG_EXT;
 		tf.protocol = ATA_PROT_PIO;
+		dma = false;
 	}
 	tf.lbal = log;
 	tf.lbam = page;
#2 lore raw

Hello,

Quoted 1 line · Martin K. Petersen

Does the patch below help?

I think it should, I'll test it.

Quoted 4 lines

Also, please let us know which drive you have and send us the output of:

# smartctl -l gplog,0x13 /dev/sdN

hm...

sudo smartctl -l gplog,0x13 /dev/sda1
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-4.1.0-rc3-dbg-00347-g0a60060-dirty] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

General Purpose Log 0x13 does not exist (override with '-T permissive' option)

fwiw, I did dmesg | grep -i ata

[    0.472463] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 4 ports 6 Gbps 0x10 impl SATA mode
[    0.476304] ata1: DUMMY
[    0.476391] ata2: DUMMY
[    0.476478] ata3: DUMMY
[    0.476565] ata4: DUMMY
[    0.476654] ata5: SATA max UDMA/133 abar m2048@0xf7a1a000 port 0xf7a1a300 irq 30
[    0.795403] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.798156] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.798160] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.798290] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.798696] ata5.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.798699] ata5.00: ATA-9: SAMSUNG MZMTE256HMHP-000, EXT49K0Q, max UDMA/133
[    0.798821] ata5.00: 500118192 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.799576] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.799581] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.799705] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.800109] ata5.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.800115] ata5.00: configured for UDMA/133
[    0.800753] scsi 4:0:0:0: Direct-Access     ATA      SAMSUNG MZMTE256 9K0Q PQ: 0 ANSI: 5

it's a SAMSUNG MZMTE256 9K0Q.

	-ss
Quoted 15 lines
drivers/ata/libata-eh.c +1 -0
index 2893563d0537..2b370ee0ae86 100644
@@ -1521,6 +1521,7 @@ retry:
 	} else {
 		tf.command = ATA_CMD_READ_LOG_EXT;
 		tf.protocol = ATA_PROT_PIO;
+		dma = false;
 	}
 	tf.lbal = log;
 	tf.lbam = page;
#3 lore raw
In reply to Martin K. Petersen
Quoted 5 lines · Martin K. Petersen

Sergey> Hello, my laptop doesn't boot anymore, spinning in "READ LOG DMA Sergey> EXT failed, trying unqueued". any reason it loops forever?

Does the patch below help?

it does.

	-ss
Quoted 24 lines

Also, please let us know which drive you have and send us the output of:

# smartctl -l gplog,0x13 /dev/sdN

Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
drivers/ata/libata-eh.c +1 -0
index 2893563d0537..2b370ee0ae86 100644
@@ -1521,6 +1521,7 @@ retry:
 	} else {
 		tf.command = ATA_CMD_READ_LOG_EXT;
 		tf.protocol = ATA_PROT_PIO;
+		dma = false;
 	}
 	tf.lbal = log;
 	tf.lbam = page;
#4 lore raw
In reply to Sergey Senozhatsky
Quoted 3 lines · Sergey Senozhatsky

my laptop doesn't boot anymore, spinning in "READ LOG DMA EXT failed, trying unqueued". any reason it loops forever?

perhaps something like this?

8<-----8<-----

Quoted 1 line

From 826eb3644e7d4b1f66a898c63865f217fb82f1f9 Mon Sep 17 00:00:00 2001

From: Sergey Senozhatsky <[email protected]>
Date: Tue, 19 May 2015 20:54:18 +0900
Subject: [PATCH] ata: do not retry ata_read_log_page() forever

Do not spin on failing ata_exec_internal() forever, make a one shot ATA_HORKAGE_NO_NCQ_LOG retry.

---
 drivers/ata/libata-eh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libata-eh.c +1 -1
index f093174..20f1549 100644
@@ -1531,7 +1531,7 @@ retry:
 	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE,
 				     buf, sectors * ATA_SECT_SIZE, 0);
 
-	if (err_mask && dma) {
+	if (err_mask && dma && !(dev->horkage & ATA_HORKAGE_NO_NCQ_LOG)) {
 		dev->horkage |= ATA_HORKAGE_NO_NCQ_LOG;
 		ata_dev_warn(dev, "READ LOG DMA EXT failed, trying unqueued\n");
 		goto retry;
Signature · 1 line
2.4.1.168.g1ea28e1