Commit 54c38444 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik

[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: default avatarJeff Garzik <jgarzik@redhat.com>
parent 37d0892c
...@@ -999,7 +999,9 @@ static void __ata_port_freeze(struct ata_port *ap) ...@@ -999,7 +999,9 @@ static void __ata_port_freeze(struct ata_port *ap)
* ata_port_freeze - abort & freeze port * ata_port_freeze - abort & freeze port
* @ap: ATA port to freeze * @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: * LOCKING:
* spin_lock_irqsave(host lock) * spin_lock_irqsave(host lock)
...@@ -1013,8 +1015,8 @@ int ata_port_freeze(struct ata_port *ap) ...@@ -1013,8 +1015,8 @@ int ata_port_freeze(struct ata_port *ap)
WARN_ON(!ap->ops->error_handler); WARN_ON(!ap->ops->error_handler);
nr_aborted = ata_port_abort(ap);
__ata_port_freeze(ap); __ata_port_freeze(ap);
nr_aborted = ata_port_abort(ap);
return nr_aborted; return nr_aborted;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment