Skip to content

Commit

Permalink
[libata] EH: freeze port before aborting commands
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Sep 1, 2009
1 parent 37d0892 commit 54c3844
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 54c3844

Please sign in to comment.