From 8930ff254a3a80d4477c3391ade07d6dd2a036c7 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 10 May 2010 21:41:33 +0200 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/ata/pata_bf54x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/ata/pata_bf54x.c') diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index e9bf44cf4142..3d94c800e9d1 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c @@ -1421,7 +1421,7 @@ static struct scsi_host_template bfin_sht = { }; static struct ata_port_operations bfin_pata_ops = { - .inherits = &ata_sff_port_ops, + .inherits = &ata_bmdma_port_ops, .set_piomode = bfin_set_piomode, .set_dmamode = bfin_set_dmamode, @@ -1450,6 +1450,8 @@ static struct ata_port_operations bfin_pata_ops = { .port_start = bfin_port_start, .port_stop = bfin_port_stop, + + .mode_filter = ATA_OP_NULL, /* will be removed soon */ }; static struct ata_port_info bfin_port_info[] = { -- cgit