Commit 071ce34d authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: move ata_pci_default_filter() out of CONFIG_PCI

ata_pci_default_filter() doesn't really have anything to do with PCI.
It's generally applicable to BMDMA controllers.  Move it out of
CONFIG_PCI.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 624d5c51
...@@ -2117,6 +2117,16 @@ void ata_std_ports(struct ata_ioports *ioaddr) ...@@ -2117,6 +2117,16 @@ void ata_std_ports(struct ata_ioports *ioaddr)
ioaddr->command_addr = ioaddr->cmd_addr + ATA_REG_CMD; ioaddr->command_addr = ioaddr->cmd_addr + ATA_REG_CMD;
} }
unsigned long ata_pci_default_filter(struct ata_device *adev, unsigned long xfer_mask)
{
/* Filter out DMA modes if the device has been configured by
the BIOS as PIO only */
if (adev->link->ap->ioaddr.bmdma_addr == NULL)
xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
return xfer_mask;
}
/** /**
* ata_bmdma_setup - Set up PCI IDE BMDMA transaction * ata_bmdma_setup - Set up PCI IDE BMDMA transaction
* @qc: Info associated with this ATA transaction. * @qc: Info associated with this ATA transaction.
...@@ -2335,16 +2345,6 @@ int ata_pci_clear_simplex(struct pci_dev *pdev) ...@@ -2335,16 +2345,6 @@ int ata_pci_clear_simplex(struct pci_dev *pdev)
return 0; return 0;
} }
unsigned long ata_pci_default_filter(struct ata_device *adev, unsigned long xfer_mask)
{
/* Filter out DMA modes if the device has been configured by
the BIOS as PIO only */
if (adev->link->ap->ioaddr.bmdma_addr == NULL)
xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
return xfer_mask;
}
/** /**
* ata_pci_init_bmdma - acquire PCI BMDMA resources and init ATA host * ata_pci_init_bmdma - acquire PCI BMDMA resources and init ATA host
* @host: target ATA host * @host: target ATA host
...@@ -2725,6 +2725,7 @@ EXPORT_SYMBOL_GPL(ata_sff_port_ops); ...@@ -2725,6 +2725,7 @@ EXPORT_SYMBOL_GPL(ata_sff_port_ops);
EXPORT_SYMBOL_GPL(ata_bmdma_port_ops); EXPORT_SYMBOL_GPL(ata_bmdma_port_ops);
EXPORT_SYMBOL_GPL(ata_qc_prep); EXPORT_SYMBOL_GPL(ata_qc_prep);
EXPORT_SYMBOL_GPL(ata_dumb_qc_prep); EXPORT_SYMBOL_GPL(ata_dumb_qc_prep);
EXPORT_SYMBOL_GPL(ata_pci_default_filter);
EXPORT_SYMBOL_GPL(ata_std_dev_select); EXPORT_SYMBOL_GPL(ata_std_dev_select);
EXPORT_SYMBOL_GPL(ata_check_status); EXPORT_SYMBOL_GPL(ata_check_status);
EXPORT_SYMBOL_GPL(ata_altstatus); EXPORT_SYMBOL_GPL(ata_altstatus);
...@@ -2760,7 +2761,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_status); ...@@ -2760,7 +2761,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_status);
EXPORT_SYMBOL_GPL(ata_bus_reset); EXPORT_SYMBOL_GPL(ata_bus_reset);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); EXPORT_SYMBOL_GPL(ata_pci_clear_simplex);
EXPORT_SYMBOL_GPL(ata_pci_default_filter);
EXPORT_SYMBOL_GPL(ata_pci_init_bmdma); EXPORT_SYMBOL_GPL(ata_pci_init_bmdma);
EXPORT_SYMBOL_GPL(ata_pci_init_sff_host); EXPORT_SYMBOL_GPL(ata_pci_init_sff_host);
EXPORT_SYMBOL_GPL(ata_pci_prepare_sff_host); EXPORT_SYMBOL_GPL(ata_pci_prepare_sff_host);
......
...@@ -1378,6 +1378,8 @@ extern void ata_bmdma_error_handler(struct ata_port *ap); ...@@ -1378,6 +1378,8 @@ extern void ata_bmdma_error_handler(struct ata_port *ap);
extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc);
extern int ata_sff_port_start(struct ata_port *ap); extern int ata_sff_port_start(struct ata_port *ap);
extern void ata_std_ports(struct ata_ioports *ioaddr); extern void ata_std_ports(struct ata_ioports *ioaddr);
extern unsigned long ata_pci_default_filter(struct ata_device *dev,
unsigned long xfer_mask);
extern void ata_bmdma_setup(struct ata_queued_cmd *qc); extern void ata_bmdma_setup(struct ata_queued_cmd *qc);
extern void ata_bmdma_start(struct ata_queued_cmd *qc); extern void ata_bmdma_start(struct ata_queued_cmd *qc);
extern void ata_bmdma_stop(struct ata_queued_cmd *qc); extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
...@@ -1386,8 +1388,6 @@ extern void ata_bus_reset(struct ata_port *ap); ...@@ -1386,8 +1388,6 @@ extern void ata_bus_reset(struct ata_port *ap);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
extern int ata_pci_clear_simplex(struct pci_dev *pdev); extern int ata_pci_clear_simplex(struct pci_dev *pdev);
extern unsigned long ata_pci_default_filter(struct ata_device *dev,
unsigned long xfer_mask);
extern int ata_pci_init_bmdma(struct ata_host *host); extern int ata_pci_init_bmdma(struct ata_host *host);
extern int ata_pci_init_sff_host(struct ata_host *host); extern int ata_pci_init_sff_host(struct ata_host *host);
extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, extern int ata_pci_prepare_sff_host(struct pci_dev *pdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment