aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-19 16:10:24 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-25 19:41:12 -0400
commit9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (patch)
tree9590f79a1a0631120322ecfa8a86f610859d7aec /drivers/ata/libata-sff.c
parentd6b0de8c28ef32d081cfee938e443ce2a2429cfe (diff)
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.c11
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)
798 case ATAPI_PROT_NODATA: 798 case ATAPI_PROT_NODATA:
799 ap->hsm_task_state = HSM_ST_LAST; 799 ap->hsm_task_state = HSM_ST_LAST;
800 break; 800 break;
801#ifdef CONFIG_ATA_BMDMA
801 case ATAPI_PROT_DMA: 802 case ATAPI_PROT_DMA:
802 ap->hsm_task_state = HSM_ST_LAST; 803 ap->hsm_task_state = HSM_ST_LAST;
803 /* initiate bmdma */ 804 /* initiate bmdma */
804 ap->ops->bmdma_start(qc); 805 ap->ops->bmdma_start(qc);
805 break; 806 break;
807#endif /* CONFIG_ATA_BMDMA */
808 default:
809 BUG();
806 } 810 }
807} 811}
808 812
@@ -2535,6 +2539,12 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_init_one);
2535 2539
2536#endif /* CONFIG_PCI */ 2540#endif /* CONFIG_PCI */
2537 2541
2542/*
2543 * BMDMA support
2544 */
2545
2546#ifdef CONFIG_ATA_BMDMA
2547
2538const struct ata_port_operations ata_bmdma_port_ops = { 2548const struct ata_port_operations ata_bmdma_port_ops = {
2539 .inherits = &ata_sff_port_ops, 2549 .inherits = &ata_sff_port_ops,
2540 2550
@@ -3287,6 +3297,7 @@ int ata_pci_bmdma_init_one(struct pci_dev *pdev,
3287EXPORT_SYMBOL_GPL(ata_pci_bmdma_init_one); 3297EXPORT_SYMBOL_GPL(ata_pci_bmdma_init_one);
3288 3298
3289#endif /* CONFIG_PCI */ 3299#endif /* CONFIG_PCI */
3300#endif /* CONFIG_ATA_BMDMA */
3290 3301
3291/** 3302/**
3292 * ata_sff_port_init - Initialize SFF/BMDMA ATA port 3303 * ata_sff_port_init - Initialize SFF/BMDMA ATA port