diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c47373f01f8..06b7e49e039 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -160,6 +160,10 @@ int libata_allow_tpm = 0; | |||
160 | module_param_named(allow_tpm, libata_allow_tpm, int, 0444); | 160 | module_param_named(allow_tpm, libata_allow_tpm, int, 0444); |
161 | MODULE_PARM_DESC(allow_tpm, "Permit the use of TPM commands (0=off [default], 1=on)"); | 161 | MODULE_PARM_DESC(allow_tpm, "Permit the use of TPM commands (0=off [default], 1=on)"); |
162 | 162 | ||
163 | static int atapi_an; | ||
164 | module_param(atapi_an, int, 0444); | ||
165 | MODULE_PARM_DESC(atapi_an, "Enable ATAPI AN media presence notification (0=0ff [default], 1=on)"); | ||
166 | |||
163 | MODULE_AUTHOR("Jeff Garzik"); | 167 | MODULE_AUTHOR("Jeff Garzik"); |
164 | MODULE_DESCRIPTION("Library module for ATA devices"); | 168 | MODULE_DESCRIPTION("Library module for ATA devices"); |
165 | MODULE_LICENSE("GPL"); | 169 | MODULE_LICENSE("GPL"); |
@@ -2122,6 +2126,14 @@ retry: | |||
2122 | goto err_out; | 2126 | goto err_out; |
2123 | } | 2127 | } |
2124 | 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 | |||
2125 | /* Falling back doesn't make sense if ID data was read | 2137 | /* Falling back doesn't make sense if ID data was read |
2126 | * successfully at least once. | 2138 | * successfully at least once. |
2127 | */ | 2139 | */ |
@@ -2510,7 +2522,8 @@ int ata_dev_configure(struct ata_device *dev) | |||
2510 | * to enable ATAPI AN to discern between PHY status | 2522 | * to enable ATAPI AN to discern between PHY status |
2511 | * changed notifications and ATAPI ANs. | 2523 | * changed notifications and ATAPI ANs. |
2512 | */ | 2524 | */ |
2513 | if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && | 2525 | if (atapi_an && |
2526 | (ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && | ||
2514 | (!sata_pmp_attached(ap) || | 2527 | (!sata_pmp_attached(ap) || |
2515 | sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) { | 2528 | sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) { |
2516 | unsigned int err_mask; | 2529 | unsigned int err_mask; |
@@ -6372,6 +6385,7 @@ static int __init ata_parse_force_one(char **cur, | |||
6372 | { "3.0Gbps", .spd_limit = 2 }, | 6385 | { "3.0Gbps", .spd_limit = 2 }, |
6373 | { "noncq", .horkage_on = ATA_HORKAGE_NONCQ }, | 6386 | { "noncq", .horkage_on = ATA_HORKAGE_NONCQ }, |
6374 | { "ncq", .horkage_off = ATA_HORKAGE_NONCQ }, | 6387 | { "ncq", .horkage_off = ATA_HORKAGE_NONCQ }, |
6388 | { "dump_id", .horkage_on = ATA_HORKAGE_DUMP_ID }, | ||
6375 | { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) }, | 6389 | { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) }, |
6376 | { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) }, | 6390 | { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) }, |
6377 | { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) }, | 6391 | { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) }, |