]> err.no Git - linux-2.6/commitdiff
libata: don't whine if ->prereset() returns -ENOENT
authorTejun Heo <htejun@gmail.com>
Mon, 12 Mar 2007 08:24:08 +0000 (17:24 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 19 Mar 2007 15:55:43 +0000 (11:55 -0400)
->prereset() returns -ENOENT to tell libata that the port is empty and
reset sequencing should be stopped.  This is not an error condition.
Update ata_eh_reset() such that it sets device classes to ATA_DEV_NONE
and return success in on -ENOENT.  This makes spurious error message
go away.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-eh.c

index 7349c3dbf774e672bfbcc8ce1ab5e8d6f2ac5ce0..361953a502035e4c846196f05ad3ad256ac6220b 100644 (file)
@@ -1625,8 +1625,14 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
                rc = prereset(ap);
                if (rc) {
                        if (rc == -ENOENT) {
-                               ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n");
+                               ata_port_printk(ap, KERN_DEBUG,
+                                               "port disabled. ignoring.\n");
                                ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
+
+                               for (i = 0; i < ATA_MAX_DEVICES; i++)
+                                       classes[i] = ATA_DEV_NONE;
+
+                               rc = 0;
                        } else
                                ata_port_printk(ap, KERN_ERR,
                                        "prereset failed (errno=%d)\n", rc);