diff options
author | Jeff Garzik <jeff@garzik.org> | 2009-04-07 19:13:15 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-09-01 19:47:19 -0400 |
commit | 54c38444fad6a99b4b19512f8f0055d69115e69e (patch) | |
tree | 47d9271855d66676f1a70bac0f9e25d1781ce3e9 /drivers/ata/libata-eh.c | |
parent | 37d0892c5a94e208cf863e3b7bac014edee4346d (diff) | |
download | kernel_samsung_smdk4412-54c38444fad6a99b4b19512f8f0055d69115e69e.zip kernel_samsung_smdk4412-54c38444fad6a99b4b19512f8f0055d69115e69e.tar.gz kernel_samsung_smdk4412-54c38444fad6a99b4b19512f8f0055d69115e69e.tar.bz2 |
[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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 79711b6..9159abe 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) * ata_port_freeze - abort & freeze port * @ap: ATA port to freeze * - * Abort and freeze @ap. + * Abort and freeze @ap. The freeze operation must be called + * first, because some hardware requires special operations + * before the taskfile registers are accessible. * * LOCKING: * spin_lock_irqsave(host lock) @@ -1013,8 +1015,8 @@ int ata_port_freeze(struct ata_port *ap) WARN_ON(!ap->ops->error_handler); - nr_aborted = ata_port_abort(ap); __ata_port_freeze(ap); + nr_aborted = ata_port_abort(ap); return nr_aborted; } |