Commit 6dffaf61 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: -ENODEV during prereset isn't an error

During prereset, -ENODEV return from ata_wait_ready() is not an error.
This causes unnecessary bug message on controllers which uses 0xff to
indicate empty port.  Fix it.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent fd7fe701
...@@ -3368,7 +3368,7 @@ int ata_std_prereset(struct ata_port *ap, unsigned long deadline) ...@@ -3368,7 +3368,7 @@ int ata_std_prereset(struct ata_port *ap, unsigned long deadline)
*/ */
if (!(ap->flags & ATA_FLAG_SKIP_D2H_BSY) && !ata_port_offline(ap)) { if (!(ap->flags & ATA_FLAG_SKIP_D2H_BSY) && !ata_port_offline(ap)) {
rc = ata_wait_ready(ap, deadline); rc = ata_wait_ready(ap, deadline);
if (rc) { if (rc && rc != -ENODEV) {
ata_port_printk(ap, KERN_WARNING, "device not ready " ata_port_printk(ap, KERN_WARNING, "device not ready "
"(errno=%d), forcing hardreset\n", rc); "(errno=%d), forcing hardreset\n", rc);
ehc->i.action |= ATA_EH_HARDRESET; ehc->i.action |= ATA_EH_HARDRESET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment