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/pata_icside.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/pata_icside.c')
-rw-r--r-- | drivers/ata/pata_icside.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index fa812e206eeb..832c8ccd0e80 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -321,7 +321,7 @@ static void pata_icside_postreset(struct ata_link *link, unsigned int *classes) | |||
321 | } | 321 | } |
322 | 322 | ||
323 | static struct ata_port_operations pata_icside_port_ops = { | 323 | static struct ata_port_operations pata_icside_port_ops = { |
324 | .inherits = &ata_sff_port_ops, | 324 | .inherits = &ata_bmdma_port_ops, |
325 | /* no need to build any PRD tables for DMA */ | 325 | /* no need to build any PRD tables for DMA */ |
326 | .qc_prep = ata_noop_qc_prep, | 326 | .qc_prep = ata_noop_qc_prep, |
327 | .sff_data_xfer = ata_sff_data_xfer_noirq, | 327 | .sff_data_xfer = ata_sff_data_xfer_noirq, |
@@ -334,6 +334,8 @@ static struct ata_port_operations pata_icside_port_ops = { | |||
334 | .set_dmamode = pata_icside_set_dmamode, | 334 | .set_dmamode = pata_icside_set_dmamode, |
335 | .postreset = pata_icside_postreset, | 335 | .postreset = pata_icside_postreset, |
336 | .post_internal_cmd = pata_icside_bmdma_stop, | 336 | .post_internal_cmd = pata_icside_bmdma_stop, |
337 | |||
338 | .mode_filter = ATA_OP_NULL, /* will be removed soon */ | ||
337 | }; | 339 | }; |
338 | 340 | ||
339 | static void __devinit | 341 | static void __devinit |