From: Tejun Heo Date: Mon, 12 Jun 2006 05:11:01 +0000 (+0900) Subject: [PATCH] libata: fix ATA_EH_REVALIDATE clearing X-Git-Tag: v2.6.18-rc1~1079^2~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9be7113b56eb5d013a611d9c65e8d1d2d3f7c94;hp=551e8889509c30cda31e464e5cbe7572c4e1febd;p=linux-2.6 [PATCH] libata: fix ATA_EH_REVALIDATE clearing ATA_EH_REVALIDATE should be cleared after all devices on the target port have been revalidated. Fix ata_eh_revalidate_and_attach() accordingly. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index f82799e225..782dfba573 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -1556,8 +1556,6 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, /* schedule the scsi_rescan_device() here */ queue_work(ata_aux_wq, &(ap->scsi_rescan_task)); - - ehc->i.action &= ~ATA_EH_REVALIDATE; } else if (dev->class == ATA_DEV_UNKNOWN && ehc->tries[dev->devno] && ata_class_enabled(ehc->classes[dev->devno])) { @@ -1578,7 +1576,9 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap, } } - if (rc) + if (rc == 0) + ehc->i.action &= ~ATA_EH_REVALIDATE; + else *r_failed_dev = dev; DPRINTK("EXIT\n");