[PATCH] libata: fast exit from EH while unloading
authorTejun Heo <htejun@gmail.com>
Mon, 12 Jun 2006 05:11:43 +0000 (14:11 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 12 Jun 2006 06:10:26 +0000 (02:10 -0400)
Make EH exit fast if the port is being unloaded.

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

index 782dfba..531a4e1 100644 (file)
@@ -1680,6 +1680,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
        down_xfermask = 0;
        rc = 0;
 
+       /* if UNLOADING, finish immediately */
+       if (ap->flags & ATA_FLAG_UNLOADING)
+               goto out;
+
        /* skip EH if possible. */
        if (ata_eh_skip_recovery(ap))
                ehc->i.action = 0;