libata-pmp-prep: implement qc_defer helpers
[powerpc.git] / drivers / ata / libata-eh.c
index 1d3b0dc..5244723 100644 (file)
@@ -451,6 +451,7 @@ void ata_scsi_error(struct Scsi_Host *host)
 
                ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
                ap->pflags &= ~ATA_PFLAG_EH_PENDING;
+               ap->excl_link = NULL;   /* don't maintain exclusion over EH */
 
                spin_unlock_irqrestore(ap->lock, flags);
 
@@ -2474,6 +2475,10 @@ void ata_eh_finish(struct ata_port *ap)
                        }
                }
        }
+
+       /* make sure nr_active_links is zero after EH */
+       WARN_ON(ap->nr_active_links);
+       ap->nr_active_links = 0;
 }
 
 /**