diff options
-rw-r--r-- | drivers/scsi/libata-eh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index 782dfba..531a4e1 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -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; |