aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2009-04-07 19:13:15 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-09-01 19:47:19 -0400
commit54c38444fad6a99b4b19512f8f0055d69115e69e (patch)
tree47d9271855d66676f1a70bac0f9e25d1781ce3e9 /drivers/ata/libata-eh.c
parent37d0892c5a94e208cf863e3b7bac014edee4346d (diff)
[libata] EH: freeze port before aborting commands
Call the ->freeze() hook before aborting qc's, because some hardware requires special handling prior to accessing the taskfile registers (for diagnosis/analysis/reset). Most notably, hardware may wish to disable the DMA engine or interrupts in the ->freeze() hook. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 79711b64054b..9159abe5211c 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -999,7 +999,9 @@ static void __ata_port_freeze(struct ata_port *ap)
999 * ata_port_freeze - abort & freeze port 999 * ata_port_freeze - abort & freeze port
1000 * @ap: ATA port to freeze 1000 * @ap: ATA port to freeze
1001 * 1001 *
1002 * Abort and freeze @ap. 1002 * Abort and freeze @ap. The freeze operation must be called
1003 * first, because some hardware requires special operations
1004 * before the taskfile registers are accessible.
1003 * 1005 *
1004 * LOCKING: 1006 * LOCKING:
1005 * spin_lock_irqsave(host lock) 1007 * spin_lock_irqsave(host lock)
@@ -1013,8 +1015,8 @@ int ata_port_freeze(struct ata_port *ap)
1013 1015
1014 WARN_ON(!ap->ops->error_handler); 1016 WARN_ON(!ap->ops->error_handler);
1015 1017
1016 nr_aborted = ata_port_abort(ap);
1017 __ata_port_freeze(ap); 1018 __ata_port_freeze(ap);
1019 nr_aborted = ata_port_abort(ap);
1018 1020
1019 return nr_aborted; 1021 return nr_aborted;
1020} 1022}