提交 5122e53e 编写于 作者: N Niklas Cassel 提交者: Damien Le Moal

ata: libata-core: do not retry reading the log on timeout

ata_read_log_page() first tries to read the log using READ LOG DMA EXT.
If that fails it will instead try to read the log using READ LOG EXT.

ata_exec_internal_sg() is synchronous, so it will wait for the command to
finish. If we actually got an error back from the device, it is correct
to retry. However, if the command timed out, ata_exec_internal_sg() will
freeze the port.

There is no point in retrying if the port is frozen, as
ata_exec_internal_sg() will return AC_ERR_SYSTEM on a frozen port,
without ever sending the command down to the drive.

Therefore, avoid retrying if the first command froze the port, as that
will result in a misleading AC_ERR_SYSTEM error print, instead of printing
the error that actually caused the port to be frozen (AC_ERR_TIMEOUT).
Signed-off-by: NNiklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
上级 7834589e
...@@ -2000,6 +2000,7 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log, ...@@ -2000,6 +2000,7 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
if (err_mask) { if (err_mask) {
if (dma) { if (dma) {
dev->horkage |= ATA_HORKAGE_NO_DMA_LOG; dev->horkage |= ATA_HORKAGE_NO_DMA_LOG;
if (!ata_port_is_frozen(dev->link->ap))
goto retry; goto retry;
} }
ata_dev_err(dev, ata_dev_err(dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册