]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
libata: -ENODEV during prereset isn't an error
authorTejun Heo <htejun@gmail.com>
Wed, 23 May 2007 09:58:52 +0000 (11:58 +0200)
committerJeff Garzik <jeff@garzik.org>
Fri, 25 May 2007 00:34:48 +0000 (20:34 -0400)
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: Tejun Heo <htejun@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index 5788a9dd0445ca3f414ac7c5bd6d029fd65a33c7..3ca9c610c110c3fda3f0aa7ee06fd107038a3de6 100644 (file)
@@ -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)) {
                rc = ata_wait_ready(ap, deadline);
-               if (rc) {
+               if (rc && rc != -ENODEV) {
                        ata_port_printk(ap, KERN_WARNING, "device not ready "
                                        "(errno=%d), forcing hardreset\n", rc);
                        ehc->i.action |= ATA_EH_HARDRESET;