diff options
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 858f70610eda..14601dc05e41 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -405,28 +405,45 @@ static struct scsi_host_template nv_swncq_sht = { | |||
405 | .slave_configure = nv_swncq_slave_config, | 405 | .slave_configure = nv_swncq_slave_config, |
406 | }; | 406 | }; |
407 | 407 | ||
408 | static struct ata_port_operations nv_generic_ops = { | 408 | /* OSDL bz3352 reports that some nv controllers can't determine device |
409 | * signature reliably and nv_hardreset is implemented to work around | ||
410 | * the problem. This was reported on nf3 and it's unclear whether any | ||
411 | * other controllers are affected. However, the workaround has been | ||
412 | * applied to all variants and there isn't much to gain by trying to | ||
413 | * find out exactly which ones are affected at this point especially | ||
414 | * because NV has moved over to ahci for newer controllers. | ||
415 | */ | ||
416 | static struct ata_port_operations nv_common_ops = { | ||
409 | .inherits = &ata_bmdma_port_ops, | 417 | .inherits = &ata_bmdma_port_ops, |
410 | .hardreset = nv_hardreset, | 418 | .hardreset = nv_hardreset, |
411 | .scr_read = nv_scr_read, | 419 | .scr_read = nv_scr_read, |
412 | .scr_write = nv_scr_write, | 420 | .scr_write = nv_scr_write, |
413 | }; | 421 | }; |
414 | 422 | ||
423 | /* OSDL bz11195 reports that link doesn't come online after hardreset | ||
424 | * on generic nv's and there have been several other similar reports | ||
425 | * on linux-ide. Disable hardreset for generic nv's. | ||
426 | */ | ||
427 | static struct ata_port_operations nv_generic_ops = { | ||
428 | .inherits = &nv_common_ops, | ||
429 | .hardreset = ATA_OP_NULL, | ||
430 | }; | ||
431 | |||
415 | static struct ata_port_operations nv_nf2_ops = { | 432 | static struct ata_port_operations nv_nf2_ops = { |
416 | .inherits = &nv_generic_ops, | 433 | .inherits = &nv_common_ops, |
417 | .freeze = nv_nf2_freeze, | 434 | .freeze = nv_nf2_freeze, |
418 | .thaw = nv_nf2_thaw, | 435 | .thaw = nv_nf2_thaw, |
419 | }; | 436 | }; |
420 | 437 | ||
421 | static struct ata_port_operations nv_ck804_ops = { | 438 | static struct ata_port_operations nv_ck804_ops = { |
422 | .inherits = &nv_generic_ops, | 439 | .inherits = &nv_common_ops, |
423 | .freeze = nv_ck804_freeze, | 440 | .freeze = nv_ck804_freeze, |
424 | .thaw = nv_ck804_thaw, | 441 | .thaw = nv_ck804_thaw, |
425 | .host_stop = nv_ck804_host_stop, | 442 | .host_stop = nv_ck804_host_stop, |
426 | }; | 443 | }; |
427 | 444 | ||
428 | static struct ata_port_operations nv_adma_ops = { | 445 | static struct ata_port_operations nv_adma_ops = { |
429 | .inherits = &nv_generic_ops, | 446 | .inherits = &nv_common_ops, |
430 | 447 | ||
431 | .check_atapi_dma = nv_adma_check_atapi_dma, | 448 | .check_atapi_dma = nv_adma_check_atapi_dma, |
432 | .sff_tf_read = nv_adma_tf_read, | 449 | .sff_tf_read = nv_adma_tf_read, |
@@ -450,7 +467,7 @@ static struct ata_port_operations nv_adma_ops = { | |||
450 | }; | 467 | }; |
451 | 468 | ||
452 | static struct ata_port_operations nv_swncq_ops = { | 469 | static struct ata_port_operations nv_swncq_ops = { |
453 | .inherits = &nv_generic_ops, | 470 | .inherits = &nv_common_ops, |
454 | 471 | ||
455 | .qc_defer = ata_std_qc_defer, | 472 | .qc_defer = ata_std_qc_defer, |
456 | .qc_prep = nv_swncq_qc_prep, | 473 | .qc_prep = nv_swncq_qc_prep, |