aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-23 06:59:11 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-25 19:41:19 -0400
commit43c9c59185eec7caaff6e9dd8d4c93a4d9836a86 (patch)
tree6c627f018b6d83c448d059d61fff0fafd8c55b86
parente7ecd435692ca9bde9d124be30b3a26e672ea6c2 (diff)
libata: implement dump_id force param
Add dump_id libata.force parameter. If specified, libata dumps full IDENTIFY data during device configuration. This is to aid debugging. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Larry Baker <baker@usgs.gov> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--drivers/ata/libata-core.c9
-rw-r--r--include/linux/libata.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b56ea860da21..a5c055066764 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1252,6 +1252,8 @@ and is between 256 and 4096 characters. It is defined in the file
1252 * nohrst, nosrst, norst: suppress hard, soft 1252 * nohrst, nosrst, norst: suppress hard, soft
1253 and both resets. 1253 and both resets.
1254 1254
1255 * dump_id: dump IDENTIFY data.
1256
1255 If there are multiple matching configurations changing 1257 If there are multiple matching configurations changing
1256 the same attribute, the last one is used. 1258 the same attribute, the last one is used.
1257 1259
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8959f42c5b3b..06b7e49e039c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2126,6 +2126,14 @@ retry:
2126 goto err_out; 2126 goto err_out;
2127 } 2127 }
2128 2128
2129 if (dev->horkage & ATA_HORKAGE_DUMP_ID) {
2130 ata_dev_printk(dev, KERN_DEBUG, "dumping IDENTIFY data, "
2131 "class=%d may_fallback=%d tried_spinup=%d\n",
2132 class, may_fallback, tried_spinup);
2133 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET,
2134 16, 2, id, ATA_ID_WORDS * sizeof(*id), true);
2135 }
2136
2129 /* Falling back doesn't make sense if ID data was read 2137 /* Falling back doesn't make sense if ID data was read
2130 * successfully at least once. 2138 * successfully at least once.
2131 */ 2139 */
@@ -6377,6 +6385,7 @@ static int __init ata_parse_force_one(char **cur,
6377 { "3.0Gbps", .spd_limit = 2 }, 6385 { "3.0Gbps", .spd_limit = 2 },
6378 { "noncq", .horkage_on = ATA_HORKAGE_NONCQ }, 6386 { "noncq", .horkage_on = ATA_HORKAGE_NONCQ },
6379 { "ncq", .horkage_off = ATA_HORKAGE_NONCQ }, 6387 { "ncq", .horkage_off = ATA_HORKAGE_NONCQ },
6388 { "dump_id", .horkage_on = ATA_HORKAGE_DUMP_ID },
6380 { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) }, 6389 { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) },
6381 { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) }, 6390 { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) },
6382 { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) }, 6391 { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) },
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 4c5eca4e663b..3bad2701bfa6 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -386,6 +386,7 @@ enum {
386 ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ 386 ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
387 ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ 387 ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
388 ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ 388 ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */
389 ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
389 390
390 /* DMA mask for user DMA control: User visible values; DO NOT 391 /* DMA mask for user DMA control: User visible values; DO NOT
391 renumber */ 392 renumber */