libata: Fix regression when the NCQ Send and Receive log page is absent
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 May 2015 23:44:17 +0000 (19:44 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 21 May 2015 21:52:55 +0000 (17:52 -0400)
Commit 5d3abf8ff67f ("libata: Fall back to unqueued READ LOG EXT if
the DMA variant fails") allowed us to fall back to the unqueued READ
LOG variant if the queued version failed. However, if the device did
not support the page at all we would end up looping due to a merge
snafu.

Ensure we only take the fallback path once.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-eh.c

index 2893563d05372e87c375da34ac6872581d53d1e1..2b370ee0ae863f3d20ebc85b2b0d9fb1822e8f1a 100644 (file)
@@ -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;