aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorRobert Hancock <hancockrwd@gmail.com>2009-07-14 22:43:39 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-09-01 19:47:20 -0400
commit6521148c6449724c3b707820b9c535c7e8b8afcd (patch)
treeb976cb33b4e7f09bdc765a09702659c14474c540 /include/linux/ata.h
parent1e641060c4b564e820abdb6a4c7a603a0d386250 (diff)
libata: add command name parsing for error output
This patch improve libata's output for error/notification messages to allow easier comprehension and debugging: When ATAPI commands issued through the SCSI layer fail, use SCSI functions to print the CDB in human-readable form instead of just dumping out the CDB in hex. Print out the name of the failed command (as defined by the ATA specification) in error handling output along with the raw register contents. When reporting status of ACPI taskfile commands executed on resume, also output the names of the commands being executed (or not) in readable form. Since the extra data for printing command names increases kernel size slightly, a config option has been added to allow disabling command name output (as well as some of the error register parsing) for those highly sensitive to kernel text size. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index f5494050df83..6299a259ed19 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -210,15 +210,25 @@ enum {
210 ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */ 210 ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */
211 ATA_CMD_IDLE = 0xE3, /* place in idle power mode */ 211 ATA_CMD_IDLE = 0xE3, /* place in idle power mode */
212 ATA_CMD_EDD = 0x90, /* execute device diagnostic */ 212 ATA_CMD_EDD = 0x90, /* execute device diagnostic */
213 ATA_CMD_DOWNLOAD_MICRO = 0x92,
214 ATA_CMD_NOP = 0x00,
213 ATA_CMD_FLUSH = 0xE7, 215 ATA_CMD_FLUSH = 0xE7,
214 ATA_CMD_FLUSH_EXT = 0xEA, 216 ATA_CMD_FLUSH_EXT = 0xEA,
215 ATA_CMD_ID_ATA = 0xEC, 217 ATA_CMD_ID_ATA = 0xEC,
216 ATA_CMD_ID_ATAPI = 0xA1, 218 ATA_CMD_ID_ATAPI = 0xA1,
219 ATA_CMD_SERVICE = 0xA2,
217 ATA_CMD_READ = 0xC8, 220 ATA_CMD_READ = 0xC8,
218 ATA_CMD_READ_EXT = 0x25, 221 ATA_CMD_READ_EXT = 0x25,
222 ATA_CMD_READ_QUEUED = 0x26,
223 ATA_CMD_READ_STREAM_EXT = 0x2B,
224 ATA_CMD_READ_STREAM_DMA_EXT = 0x2A,
219 ATA_CMD_WRITE = 0xCA, 225 ATA_CMD_WRITE = 0xCA,
220 ATA_CMD_WRITE_EXT = 0x35, 226 ATA_CMD_WRITE_EXT = 0x35,
227 ATA_CMD_WRITE_QUEUED = 0x36,
228 ATA_CMD_WRITE_STREAM_EXT = 0x3B,
229 ATA_CMD_WRITE_STREAM_DMA_EXT = 0x3A,
221 ATA_CMD_WRITE_FUA_EXT = 0x3D, 230 ATA_CMD_WRITE_FUA_EXT = 0x3D,
231 ATA_CMD_WRITE_QUEUED_FUA_EXT = 0x3E,
222 ATA_CMD_FPDMA_READ = 0x60, 232 ATA_CMD_FPDMA_READ = 0x60,
223 ATA_CMD_FPDMA_WRITE = 0x61, 233 ATA_CMD_FPDMA_WRITE = 0x61,
224 ATA_CMD_PIO_READ = 0x20, 234 ATA_CMD_PIO_READ = 0x20,
@@ -235,6 +245,7 @@ enum {
235 ATA_CMD_PACKET = 0xA0, 245 ATA_CMD_PACKET = 0xA0,
236 ATA_CMD_VERIFY = 0x40, 246 ATA_CMD_VERIFY = 0x40,
237 ATA_CMD_VERIFY_EXT = 0x42, 247 ATA_CMD_VERIFY_EXT = 0x42,
248 ATA_CMD_WRITE_UNCORR_EXT = 0x45,
238 ATA_CMD_STANDBYNOW1 = 0xE0, 249 ATA_CMD_STANDBYNOW1 = 0xE0,
239 ATA_CMD_IDLEIMMEDIATE = 0xE1, 250 ATA_CMD_IDLEIMMEDIATE = 0xE1,
240 ATA_CMD_SLEEP = 0xE6, 251 ATA_CMD_SLEEP = 0xE6,
@@ -243,15 +254,34 @@ enum {
243 ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, 254 ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
244 ATA_CMD_SET_MAX = 0xF9, 255 ATA_CMD_SET_MAX = 0xF9,
245 ATA_CMD_SET_MAX_EXT = 0x37, 256 ATA_CMD_SET_MAX_EXT = 0x37,
246 ATA_CMD_READ_LOG_EXT = 0x2f, 257 ATA_CMD_READ_LOG_EXT = 0x2F,
258 ATA_CMD_WRITE_LOG_EXT = 0x3F,
259 ATA_CMD_READ_LOG_DMA_EXT = 0x47,
260 ATA_CMD_WRITE_LOG_DMA_EXT = 0x57,
261 ATA_CMD_TRUSTED_RCV = 0x5C,
262 ATA_CMD_TRUSTED_RCV_DMA = 0x5D,
263 ATA_CMD_TRUSTED_SND = 0x5E,
264 ATA_CMD_TRUSTED_SND_DMA = 0x5F,
247 ATA_CMD_PMP_READ = 0xE4, 265 ATA_CMD_PMP_READ = 0xE4,
248 ATA_CMD_PMP_WRITE = 0xE8, 266 ATA_CMD_PMP_WRITE = 0xE8,
249 ATA_CMD_CONF_OVERLAY = 0xB1, 267 ATA_CMD_CONF_OVERLAY = 0xB1,
268 ATA_CMD_SEC_SET_PASS = 0xF1,
269 ATA_CMD_SEC_UNLOCK = 0xF2,
270 ATA_CMD_SEC_ERASE_PREP = 0xF3,
271 ATA_CMD_SEC_ERASE_UNIT = 0xF4,
250 ATA_CMD_SEC_FREEZE_LOCK = 0xF5, 272 ATA_CMD_SEC_FREEZE_LOCK = 0xF5,
273 ATA_CMD_SEC_DISABLE_PASS = 0xF6,
274 ATA_CMD_CONFIG_STREAM = 0x51,
251 ATA_CMD_SMART = 0xB0, 275 ATA_CMD_SMART = 0xB0,
252 ATA_CMD_MEDIA_LOCK = 0xDE, 276 ATA_CMD_MEDIA_LOCK = 0xDE,
253 ATA_CMD_MEDIA_UNLOCK = 0xDF, 277 ATA_CMD_MEDIA_UNLOCK = 0xDF,
254 ATA_CMD_DSM = 0x06, 278 ATA_CMD_DSM = 0x06,
279 ATA_CMD_CHK_MED_CRD_TYP = 0xD1,
280 ATA_CMD_CFA_REQ_EXT_ERR = 0x03,
281 ATA_CMD_CFA_WRITE_NE = 0x38,
282 ATA_CMD_CFA_TRANS_SECT = 0x87,
283 ATA_CMD_CFA_ERASE = 0xC0,
284 ATA_CMD_CFA_WRITE_MULT_NE = 0xCD,
255 /* marked obsolete in the ATA/ATAPI-7 spec */ 285 /* marked obsolete in the ATA/ATAPI-7 spec */
256 ATA_CMD_RESTORE = 0x10, 286 ATA_CMD_RESTORE = 0x10,
257 287