diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:09 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:09 -0400 |
commit | e318049949b07152d851dbfebbd93e560af45ebe (patch) | |
tree | cbc322c94717c9ac5d7e2c48a9f690a2e0145b81 /include/linux/libata.h | |
parent | 7b70fc039824bc7303e4007a5f758f832de56611 (diff) |
[PATCH] libata-eh-fw: implement freeze/thaw
Freezing is performed atomic w.r.t. host_set->lock and once frozen
LLDD is not allowed to access the port or any qc on it. Also, libata
makes sure that no new qc gets issued to a frozen port.
A frozen port is thawed after a reset operation completes
successfully, so reset methods must do its job while the port is
frozen. During initialization all ports get frozen before requesting
IRQ, so reset methods are always invoked on a frozen port.
Optional ->freeze and ->thaw operations notify LLDD that the port is
being frozen and thawed, respectively. LLDD can disable/enable
hardware interrupt in these callbacks if the controller's IRQ mask can
be changed dynamically. If the controller doesn't allow such
operation, LLDD can check for frozen state in the interrupt handler
and ack/clear interrupts unconditionally while frozen.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 086e14690954..6758b4d374a0 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -665,6 +665,10 @@ extern void ata_eng_timeout(struct ata_port *ap); | |||
665 | 665 | ||
666 | extern void ata_port_schedule_eh(struct ata_port *ap); | 666 | extern void ata_port_schedule_eh(struct ata_port *ap); |
667 | extern int ata_port_abort(struct ata_port *ap); | 667 | extern int ata_port_abort(struct ata_port *ap); |
668 | extern int ata_port_freeze(struct ata_port *ap); | ||
669 | |||
670 | extern void ata_eh_freeze_port(struct ata_port *ap); | ||
671 | extern void ata_eh_thaw_port(struct ata_port *ap); | ||
668 | 672 | ||
669 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 673 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
670 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 674 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |