diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:58 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:58 -0400 |
commit | 9ec957f2002bd2994be659bbc0ec28397fa251ee (patch) | |
tree | 26c920d57260ebd397f19dd597ab845b68d04d18 /include | |
parent | f15a1dafed22d5037e0feea7528e1eeb28a1a7a3 (diff) |
[PATCH] libata-eh-fw: add flags and operations for new EH
Add ATA_FLAG_EH_{PENDING|FROZEN}, ATA_ATA_QCFLAG_{FAILED|SENSE_VALID}
and ops->freeze, thaw, error_handler, post_internal_cmd() for new EH.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91e10e6b7565..e5d6d7f8e6dc 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -146,13 +146,16 @@ enum { | |||
146 | ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ | 146 | ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ |
147 | ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */ | 147 | ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */ |
148 | 148 | ||
149 | ATA_FLAG_NOINTR = (1 << 16), /* FIXME: Remove this once | 149 | ATA_FLAG_NOINTR = (1 << 13), /* FIXME: Remove this once |
150 | * proper HSM is in place. */ | 150 | * proper HSM is in place. */ |
151 | ATA_FLAG_DEBUGMSG = (1 << 17), | 151 | ATA_FLAG_DEBUGMSG = (1 << 14), |
152 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 18), /* flush port task */ | 152 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* flush port task */ |
153 | 153 | ||
154 | ATA_FLAG_DISABLED = (1 << 19), /* port is disabled, ignore it */ | 154 | ATA_FLAG_EH_PENDING = (1 << 16), /* EH pending */ |
155 | ATA_FLAG_SUSPENDED = (1 << 20), /* port is suspended */ | 155 | ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */ |
156 | |||
157 | ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */ | ||
158 | ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */ | ||
156 | 159 | ||
157 | /* bits 24:31 of ap->flags are reserved for LLDD specific flags */ | 160 | /* bits 24:31 of ap->flags are reserved for LLDD specific flags */ |
158 | 161 | ||
@@ -164,7 +167,9 @@ enum { | |||
164 | ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ | 167 | ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ |
165 | ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ | 168 | ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ |
166 | 169 | ||
167 | ATA_QCFLAG_EH_SCHEDULED = (1 << 16), /* EH scheduled */ | 170 | ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */ |
171 | ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */ | ||
172 | ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ | ||
168 | 173 | ||
169 | /* host set flags */ | 174 | /* host set flags */ |
170 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ | 175 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ |
@@ -463,7 +468,15 @@ struct ata_port_operations { | |||
463 | void (*qc_prep) (struct ata_queued_cmd *qc); | 468 | void (*qc_prep) (struct ata_queued_cmd *qc); |
464 | unsigned int (*qc_issue) (struct ata_queued_cmd *qc); | 469 | unsigned int (*qc_issue) (struct ata_queued_cmd *qc); |
465 | 470 | ||
466 | void (*eng_timeout) (struct ata_port *ap); | 471 | /* Error handlers. ->error_handler overrides ->eng_timeout and |
472 | * indicates that new-style EH is in place. | ||
473 | */ | ||
474 | void (*eng_timeout) (struct ata_port *ap); /* obsolete */ | ||
475 | |||
476 | void (*freeze) (struct ata_port *ap); | ||
477 | void (*thaw) (struct ata_port *ap); | ||
478 | void (*error_handler) (struct ata_port *ap); | ||
479 | void (*post_internal_cmd) (struct ata_queued_cmd *qc); | ||
467 | 480 | ||
468 | irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); | 481 | irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); |
469 | void (*irq_clear) (struct ata_port *); | 482 | void (*irq_clear) (struct ata_port *); |