diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-23 12:59:11 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-25 19:41:19 -0400 |
commit | 43c9c59185eec7caaff6e9dd8d4c93a4d9836a86 (patch) | |
tree | 6c627f018b6d83c448d059d61fff0fafd8c55b86 /drivers/ata/libata-core.c | |
parent | e7ecd435692ca9bde9d124be30b3a26e672ea6c2 (diff) | |
download | kernel-common-43c9c59185eec7caaff6e9dd8d4c93a4d9836a86.tar.gz kernel-common-43c9c59185eec7caaff6e9dd8d4c93a4d9836a86.tar.bz2 kernel-common-43c9c59185eec7caaff6e9dd8d4c93a4d9836a86.zip |
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>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 9 |
1 files changed, 9 insertions, 0 deletions
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: goto err_out; } + if (dev->horkage & ATA_HORKAGE_DUMP_ID) { + ata_dev_printk(dev, KERN_DEBUG, "dumping IDENTIFY data, " + "class=%d may_fallback=%d tried_spinup=%d\n", + class, may_fallback, tried_spinup); + print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, + 16, 2, id, ATA_ID_WORDS * sizeof(*id), true); + } + /* Falling back doesn't make sense if ID data was read * successfully at least once. */ @@ -6377,6 +6385,7 @@ static int __init ata_parse_force_one(char **cur, { "3.0Gbps", .spd_limit = 2 }, { "noncq", .horkage_on = ATA_HORKAGE_NONCQ }, { "ncq", .horkage_off = ATA_HORKAGE_NONCQ }, + { "dump_id", .horkage_on = ATA_HORKAGE_DUMP_ID }, { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) }, { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) }, { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) }, |