diff options
author | Tejun Heo <tj@kernel.org> | 2010-05-19 22:10:24 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-05-25 19:41:12 -0400 |
commit | 9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (patch) | |
tree | 9590f79a1a0631120322ecfa8a86f610859d7aec /drivers/ata/libata-sff.c | |
parent | d6b0de8c28ef32d081cfee938e443ce2a2429cfe (diff) | |
download | linux-9a7780c9acb821fe1c2b6fc53f74cc2556ff5364.tar.bz2 |
libata-sff: make BMDMA optional
Make BMDMA optional depending on new config variable CONFIG_ATA_BMDMA.
In Kconfig, drivers are grouped into five groups - non-SFF native, SFF
w/ custom DMA interface, SFF w/ BMDMA, PIO-only SFF, and generic
fallback / legacy ones. Kconfig and Makefile are reorganized
according to the groups and ordered alphabetically inside each group.
ata_ioports.bmdma_addr and ata_port.bmdma_prd[_dma] are put into
CONFIG_ATA_BMDMA, as are all bmdma related ops, variables and
functions.
This increase the binary size slightly when BMDMA is enabled but on
both native-only and PIO-only configurations the size is slightly
reduced. Either way, the size difference is insignificant. This
change is more meaningful to signify the separation between SFF and
BMDMA and as a tool to verify the separation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r-- | drivers/ata/libata-sff.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index c29f1468e164..efa4a18cfb9d 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -798,11 +798,15 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc) case ATAPI_PROT_NODATA: ap->hsm_task_state = HSM_ST_LAST; break; +#ifdef CONFIG_ATA_BMDMA case ATAPI_PROT_DMA: ap->hsm_task_state = HSM_ST_LAST; /* initiate bmdma */ ap->ops->bmdma_start(qc); break; +#endif /* CONFIG_ATA_BMDMA */ + default: + BUG(); } } @@ -2535,6 +2539,12 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_init_one); #endif /* CONFIG_PCI */ +/* + * BMDMA support + */ + +#ifdef CONFIG_ATA_BMDMA + const struct ata_port_operations ata_bmdma_port_ops = { .inherits = &ata_sff_port_ops, @@ -3287,6 +3297,7 @@ int ata_pci_bmdma_init_one(struct pci_dev *pdev, EXPORT_SYMBOL_GPL(ata_pci_bmdma_init_one); #endif /* CONFIG_PCI */ +#endif /* CONFIG_ATA_BMDMA */ /** * ata_sff_port_init - Initialize SFF/BMDMA ATA port |