[PATCH 05/21] ata: Stop clearing host_eh_scheduled from error handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that the caller of sas_ata_strategy_handler() clears host_eh_scheduled,
remove the code from the ATA core that that clears host_eh_scheduled.

Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Hannes Reinecke <hare@xxxxxxx>
Cc: Ming Lei <ming.lei@xxxxxxxxxx>
Cc: John Garry <john.garry@xxxxxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 drivers/ata/libata-core.c |  2 --
 drivers/ata/libata-eh.c   | 30 +++---------------------------
 include/linux/libata.h    |  1 -
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 61c762961ca8..b26fb305a56f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -69,7 +69,6 @@ const struct ata_port_operations ata_base_port_ops = {
 	.postreset		= ata_std_postreset,
 	.error_handler		= ata_std_error_handler,
 	.sched_eh		= ata_std_sched_eh,
-	.end_eh			= ata_std_end_eh,
 };
 
 const struct ata_port_operations sata_port_ops = {
@@ -6419,7 +6418,6 @@ struct ata_port_operations ata_dummy_port_ops = {
 	.qc_issue		= ata_dummy_qc_issue,
 	.error_handler		= ata_dummy_error_handler,
 	.sched_eh		= ata_std_sched_eh,
-	.end_eh			= ata_std_end_eh,
 };
 EXPORT_SYMBOL_GPL(ata_dummy_port_ops);
 
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index bb3637762985..e88ffbe31a36 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -724,12 +724,9 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap)
 		ata_for_each_link(link, ap, HOST_FIRST)
 			memset(&link->eh_info, 0, sizeof(link->eh_info));
 
-		/* end eh (clear host_eh_scheduled) while holding
-		 * ap->lock such that if exception occurs after this
-		 * point but before EH completion, SCSI midlayer will
-		 * re-initiate EH.
-		 */
-		ap->ops->end_eh(ap);
+		/* end eh while holding ap->lock */
+		if (ap->ops->end_eh)
+			ap->ops->end_eh(ap);
 
 		spin_unlock_irqrestore(ap->lock, flags);
 		ata_eh_release(ap);
@@ -936,27 +933,6 @@ void ata_std_sched_eh(struct ata_port *ap)
 }
 EXPORT_SYMBOL_GPL(ata_std_sched_eh);
 
-/**
- * ata_std_end_eh - non-libsas ata_ports complete eh with this common routine
- * @ap: ATA port to end EH for
- *
- * In the libata object model there is a 1:1 mapping of ata_port to
- * shost, so host fields can be directly manipulated under ap->lock, in
- * the libsas case we need to hold a lock at the ha->level to coordinate
- * these events.
- *
- *	LOCKING:
- *	spin_lock_irqsave(host lock)
- */
-void ata_std_end_eh(struct ata_port *ap)
-{
-	struct Scsi_Host *host = ap->scsi_host;
-
-	host->host_eh_scheduled = 0;
-}
-EXPORT_SYMBOL(ata_std_end_eh);
-
-
 /**
  *	ata_port_schedule_eh - schedule error handling without a qc
  *	@ap: ATA port to schedule EH for
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5f550eb27f81..88f4f7e466fb 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1356,7 +1356,6 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
 		      ata_postreset_fn_t postreset);
 extern void ata_std_error_handler(struct ata_port *ap);
 extern void ata_std_sched_eh(struct ata_port *ap);
-extern void ata_std_end_eh(struct ata_port *ap);
 extern int ata_link_nr_enabled(struct ata_link *link);
 
 /*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux