diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-10 15:41:33 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-19 13:31:29 -0400 |
commit | 8930ff254a3a80d4477c3391ade07d6dd2a036c7 (patch) | |
tree | 2c83672d48fbe306d6968f9f54b0d80fb736d5f9 /drivers/ata/sata_mv.c | |
parent | 9f2f72107ff621fdf3066e5a1b5ecb03ee587ebc (diff) |
libata-sff: clean up inheritance in several drivers
1. pata_cmd640 is PIO only. Inherit from sff.
2. pata_macio is BMDMA. Inherit from bmdma and drop explicit
bmdma_mode_filter() setting.
3. In sata_mv, unlike mv5, mv6 is BMDMA. Inherit from bmdma and
don't clear ->post_internal_cmd().
4. bf54x and icside are quasi-BMDMA controllers which don't use the
standard BMDMA registers so they don't initialize bmdma_addr and
inherit from sff to avoid the default mode_filter which disables
DMA modes if bmdma_addr is not initialized.
For 2 and 3, this patch makes the drivers explicitly specify
->mode_filter to ATA_OP_NULL while inheriting from ata_bmdma_port_ops.
These will be removed by the next patch.
This patch makes all and only BMDMA drivers inherit from
ata_bmdma_port_ops to ease further SFF/BMDMA separation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 318862e8a8a9..a03371075990 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -686,16 +686,27 @@ static struct ata_port_operations mv5_ops = { | |||
686 | }; | 686 | }; |
687 | 687 | ||
688 | static struct ata_port_operations mv6_ops = { | 688 | static struct ata_port_operations mv6_ops = { |
689 | .inherits = &mv5_ops, | 689 | .inherits = &ata_bmdma_port_ops, |
690 | |||
691 | .lost_interrupt = ATA_OP_NULL, | ||
692 | |||
693 | .qc_defer = mv_qc_defer, | ||
694 | .qc_prep = mv_qc_prep, | ||
695 | .qc_issue = mv_qc_issue, | ||
696 | |||
690 | .dev_config = mv6_dev_config, | 697 | .dev_config = mv6_dev_config, |
691 | .scr_read = mv_scr_read, | ||
692 | .scr_write = mv_scr_write, | ||
693 | 698 | ||
699 | .freeze = mv_eh_freeze, | ||
700 | .thaw = mv_eh_thaw, | ||
701 | .hardreset = mv_hardreset, | ||
702 | .softreset = mv_softreset, | ||
694 | .pmp_hardreset = mv_pmp_hardreset, | 703 | .pmp_hardreset = mv_pmp_hardreset, |
695 | .pmp_softreset = mv_softreset, | 704 | .pmp_softreset = mv_softreset, |
696 | .softreset = mv_softreset, | ||
697 | .error_handler = mv_pmp_error_handler, | 705 | .error_handler = mv_pmp_error_handler, |
698 | 706 | ||
707 | .scr_read = mv_scr_read, | ||
708 | .scr_write = mv_scr_write, | ||
709 | |||
699 | .sff_check_status = mv_sff_check_status, | 710 | .sff_check_status = mv_sff_check_status, |
700 | .sff_irq_clear = mv_sff_irq_clear, | 711 | .sff_irq_clear = mv_sff_irq_clear, |
701 | .check_atapi_dma = mv_check_atapi_dma, | 712 | .check_atapi_dma = mv_check_atapi_dma, |
@@ -703,6 +714,11 @@ static struct ata_port_operations mv6_ops = { | |||
703 | .bmdma_start = mv_bmdma_start, | 714 | .bmdma_start = mv_bmdma_start, |
704 | .bmdma_stop = mv_bmdma_stop, | 715 | .bmdma_stop = mv_bmdma_stop, |
705 | .bmdma_status = mv_bmdma_status, | 716 | .bmdma_status = mv_bmdma_status, |
717 | |||
718 | .port_start = mv_port_start, | ||
719 | .port_stop = mv_port_stop, | ||
720 | |||
721 | .mode_filter = ATA_OP_NULL, /* will be removed soon */ | ||
706 | }; | 722 | }; |
707 | 723 | ||
708 | static struct ata_port_operations mv_iie_ops = { | 724 | static struct ata_port_operations mv_iie_ops = { |