diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:17 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:58:17 -0400 |
commit | 9be1e979f2e1e57a091a658fa88dac266f9fd6fe (patch) | |
tree | 781b216ce5a2b39c711ee32d285f4455feba7d34 /include/linux | |
parent | 246619da308c6910a3ae30e7e5fbf46139619efe (diff) |
[PATCH] libata-eh: add ATA and libata flags for new EH
Add ATA and libata flags to be used by new EH.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ata.h | 13 | ||||
-rw-r--r-- | include/linux/libata.h | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 312a2c0c64e6..a7c41f3df8f4 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -97,6 +97,9 @@ enum { | |||
97 | ATA_DRQ = (1 << 3), /* data request i/o */ | 97 | ATA_DRQ = (1 << 3), /* data request i/o */ |
98 | ATA_ERR = (1 << 0), /* have an error */ | 98 | ATA_ERR = (1 << 0), /* have an error */ |
99 | ATA_SRST = (1 << 2), /* software reset */ | 99 | ATA_SRST = (1 << 2), /* software reset */ |
100 | ATA_ICRC = (1 << 7), /* interface CRC error */ | ||
101 | ATA_UNC = (1 << 6), /* uncorrectable media error */ | ||
102 | ATA_IDNF = (1 << 4), /* ID not found */ | ||
100 | ATA_ABORTED = (1 << 2), /* command aborted */ | 103 | ATA_ABORTED = (1 << 2), /* command aborted */ |
101 | 104 | ||
102 | /* ATA command block registers */ | 105 | /* ATA command block registers */ |
@@ -192,6 +195,16 @@ enum { | |||
192 | SCR_ACTIVE = 3, | 195 | SCR_ACTIVE = 3, |
193 | SCR_NOTIFICATION = 4, | 196 | SCR_NOTIFICATION = 4, |
194 | 197 | ||
198 | /* SError bits */ | ||
199 | SERR_DATA_RECOVERED = (1 << 0), /* recovered data error */ | ||
200 | SERR_COMM_RECOVERED = (1 << 1), /* recovered comm failure */ | ||
201 | SERR_DATA = (1 << 8), /* unrecovered data error */ | ||
202 | SERR_PERSISTENT = (1 << 9), /* persistent data/comm error */ | ||
203 | SERR_PROTOCOL = (1 << 10), /* protocol violation */ | ||
204 | SERR_INTERNAL = (1 << 11), /* host internal error */ | ||
205 | SERR_PHYRDY_CHG = (1 << 16), /* PHY RDY changed */ | ||
206 | SERR_DEV_XCHG = (1 << 26), /* device exchanged */ | ||
207 | |||
195 | /* struct ata_taskfile flags */ | 208 | /* struct ata_taskfile flags */ |
196 | ATA_TFLAG_LBA48 = (1 << 0), /* enable 48-bit LBA and "HOB" */ | 209 | ATA_TFLAG_LBA48 = (1 << 0), /* enable 48-bit LBA and "HOB" */ |
197 | ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */ | 210 | ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 5ad50163c8ef..6fe5ed8eabf5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -155,6 +155,7 @@ enum { | |||
155 | 155 | ||
156 | ATA_FLAG_EH_PENDING = (1 << 16), /* EH pending */ | 156 | ATA_FLAG_EH_PENDING = (1 << 16), /* EH pending */ |
157 | ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */ | 157 | ATA_FLAG_FROZEN = (1 << 17), /* port is frozen */ |
158 | ATA_FLAG_RECOVERED = (1 << 18), /* recovery action performed */ | ||
158 | 159 | ||
159 | ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */ | 160 | ATA_FLAG_DISABLED = (1 << 22), /* port is disabled, ignore it */ |
160 | ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */ | 161 | ATA_FLAG_SUSPENDED = (1 << 23), /* port is suspended (power) */ |
@@ -225,6 +226,13 @@ enum { | |||
225 | ATA_PORT_PRIMARY = (1 << 0), | 226 | ATA_PORT_PRIMARY = (1 << 0), |
226 | ATA_PORT_SECONDARY = (1 << 1), | 227 | ATA_PORT_SECONDARY = (1 << 1), |
227 | 228 | ||
229 | /* reset / recovery action types */ | ||
230 | ATA_EH_REVALIDATE = (1 << 0), | ||
231 | ATA_EH_SOFTRESET = (1 << 1), | ||
232 | ATA_EH_HARDRESET = (1 << 2), | ||
233 | |||
234 | ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, | ||
235 | |||
228 | /* max repeat if error condition is still set after ->error_handler */ | 236 | /* max repeat if error condition is still set after ->error_handler */ |
229 | ATA_EH_MAX_REPEAT = 5, | 237 | ATA_EH_MAX_REPEAT = 5, |
230 | 238 | ||