diff options
author | Tejun Heo <htejun@gmail.com> | 2008-03-24 23:22:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:17 -0400 |
commit | 6bd99b4e0998571808fc1f09d5162348f21ff8c1 (patch) | |
tree | e338bd445aaa5cda4bbf1f5598acf70f0d6b68de /drivers/ata/sata_nv.c | |
parent | 358f9a77a668660729e705fde9c3cf69f013aa98 (diff) |
libata: normalize port_info, port_operations and sht tables
Over the time, port info, ops and sht structures developed quite a bit
of inconsistencies. This patch updates drivers.
* Enable/disable_pm callbacks added to all ahci ops tables.
* Every driver for SFF controllers now uses ata_sff_port_start()
instead of ata_port_start() unless the driver has custom
implementation.
* Every driver for SFF controllers now uses ata_pci_default_filter()
unless the driver has custom implementation.
* Removed an odd port_info->sht initialization from ata_piix.c.
Likely a merge byproduct.
* A port which has ATA_FLAG_SATA set doesn't need to set cable_detect
to ata_cable_sata(). Remove it from via and mv port ops.
* Some drivers had unnecessary .max_sectors initialization which is
ignored and was missing .slave_destroy callback. Fixed.
* Removed unnecessary sht initializations port_info's.
* Removed onsolete scsi device suspend/resume callbacks from
pata_bf54x.
* No reason to set ata_pci_default_filter() and bmdma functions for
PIO-only drivers. Remove those callbacks and replace
ata_bmdma_irq_clear with ata_noop_irq_clear.
* pata_platform sets port_start to ata_dummy_ret0. port_start can
just be set to NULL.
* sata_fsl supports NCQ but was missing qc_defer. Fixed.
* pata_rb600_cf implements dummy port_start. Removed.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 75b76535c720..bd5b6c35ee5d 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -452,6 +452,7 @@ static const struct ata_port_operations nv_generic_ops = { | |||
452 | .bmdma_status = ata_bmdma_status, | 452 | .bmdma_status = ata_bmdma_status, |
453 | .qc_prep = ata_qc_prep, | 453 | .qc_prep = ata_qc_prep, |
454 | .qc_issue = ata_qc_issue_prot, | 454 | .qc_issue = ata_qc_issue_prot, |
455 | .mode_filter = ata_pci_default_filter, | ||
455 | .freeze = ata_bmdma_freeze, | 456 | .freeze = ata_bmdma_freeze, |
456 | .thaw = ata_bmdma_thaw, | 457 | .thaw = ata_bmdma_thaw, |
457 | .error_handler = nv_error_handler, | 458 | .error_handler = nv_error_handler, |
@@ -461,7 +462,7 @@ static const struct ata_port_operations nv_generic_ops = { | |||
461 | .irq_on = ata_irq_on, | 462 | .irq_on = ata_irq_on, |
462 | .scr_read = nv_scr_read, | 463 | .scr_read = nv_scr_read, |
463 | .scr_write = nv_scr_write, | 464 | .scr_write = nv_scr_write, |
464 | .port_start = ata_port_start, | 465 | .port_start = ata_sff_port_start, |
465 | }; | 466 | }; |
466 | 467 | ||
467 | static const struct ata_port_operations nv_nf2_ops = { | 468 | static const struct ata_port_operations nv_nf2_ops = { |
@@ -476,6 +477,7 @@ static const struct ata_port_operations nv_nf2_ops = { | |||
476 | .bmdma_status = ata_bmdma_status, | 477 | .bmdma_status = ata_bmdma_status, |
477 | .qc_prep = ata_qc_prep, | 478 | .qc_prep = ata_qc_prep, |
478 | .qc_issue = ata_qc_issue_prot, | 479 | .qc_issue = ata_qc_issue_prot, |
480 | .mode_filter = ata_pci_default_filter, | ||
479 | .freeze = nv_nf2_freeze, | 481 | .freeze = nv_nf2_freeze, |
480 | .thaw = nv_nf2_thaw, | 482 | .thaw = nv_nf2_thaw, |
481 | .error_handler = nv_error_handler, | 483 | .error_handler = nv_error_handler, |
@@ -485,7 +487,7 @@ static const struct ata_port_operations nv_nf2_ops = { | |||
485 | .irq_on = ata_irq_on, | 487 | .irq_on = ata_irq_on, |
486 | .scr_read = nv_scr_read, | 488 | .scr_read = nv_scr_read, |
487 | .scr_write = nv_scr_write, | 489 | .scr_write = nv_scr_write, |
488 | .port_start = ata_port_start, | 490 | .port_start = ata_sff_port_start, |
489 | }; | 491 | }; |
490 | 492 | ||
491 | static const struct ata_port_operations nv_ck804_ops = { | 493 | static const struct ata_port_operations nv_ck804_ops = { |
@@ -500,6 +502,7 @@ static const struct ata_port_operations nv_ck804_ops = { | |||
500 | .bmdma_status = ata_bmdma_status, | 502 | .bmdma_status = ata_bmdma_status, |
501 | .qc_prep = ata_qc_prep, | 503 | .qc_prep = ata_qc_prep, |
502 | .qc_issue = ata_qc_issue_prot, | 504 | .qc_issue = ata_qc_issue_prot, |
505 | .mode_filter = ata_pci_default_filter, | ||
503 | .freeze = nv_ck804_freeze, | 506 | .freeze = nv_ck804_freeze, |
504 | .thaw = nv_ck804_thaw, | 507 | .thaw = nv_ck804_thaw, |
505 | .error_handler = nv_error_handler, | 508 | .error_handler = nv_error_handler, |
@@ -509,7 +512,7 @@ static const struct ata_port_operations nv_ck804_ops = { | |||
509 | .irq_on = ata_irq_on, | 512 | .irq_on = ata_irq_on, |
510 | .scr_read = nv_scr_read, | 513 | .scr_read = nv_scr_read, |
511 | .scr_write = nv_scr_write, | 514 | .scr_write = nv_scr_write, |
512 | .port_start = ata_port_start, | 515 | .port_start = ata_sff_port_start, |
513 | .host_stop = nv_ck804_host_stop, | 516 | .host_stop = nv_ck804_host_stop, |
514 | }; | 517 | }; |
515 | 518 | ||
@@ -527,6 +530,7 @@ static const struct ata_port_operations nv_adma_ops = { | |||
527 | .qc_defer = ata_std_qc_defer, | 530 | .qc_defer = ata_std_qc_defer, |
528 | .qc_prep = nv_adma_qc_prep, | 531 | .qc_prep = nv_adma_qc_prep, |
529 | .qc_issue = nv_adma_qc_issue, | 532 | .qc_issue = nv_adma_qc_issue, |
533 | .mode_filter = ata_pci_default_filter, | ||
530 | .freeze = nv_adma_freeze, | 534 | .freeze = nv_adma_freeze, |
531 | .thaw = nv_adma_thaw, | 535 | .thaw = nv_adma_thaw, |
532 | .error_handler = nv_adma_error_handler, | 536 | .error_handler = nv_adma_error_handler, |
@@ -558,6 +562,7 @@ static const struct ata_port_operations nv_swncq_ops = { | |||
558 | .qc_defer = ata_std_qc_defer, | 562 | .qc_defer = ata_std_qc_defer, |
559 | .qc_prep = nv_swncq_qc_prep, | 563 | .qc_prep = nv_swncq_qc_prep, |
560 | .qc_issue = nv_swncq_qc_issue, | 564 | .qc_issue = nv_swncq_qc_issue, |
565 | .mode_filter = ata_pci_default_filter, | ||
561 | .freeze = nv_mcp55_freeze, | 566 | .freeze = nv_mcp55_freeze, |
562 | .thaw = nv_mcp55_thaw, | 567 | .thaw = nv_mcp55_thaw, |
563 | .error_handler = nv_swncq_error_handler, | 568 | .error_handler = nv_swncq_error_handler, |