diff options
-rw-r--r-- | drivers/ata/libata-sff.c | 22 | ||||
-rw-r--r-- | include/linux/libata.h | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 840ae6da59bc..ebdd46bc13c4 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -2117,6 +2117,16 @@ void ata_std_ports(struct ata_ioports *ioaddr) | |||
2117 | ioaddr->command_addr = ioaddr->cmd_addr + ATA_REG_CMD; | 2117 | ioaddr->command_addr = ioaddr->cmd_addr + ATA_REG_CMD; |
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | unsigned long ata_pci_default_filter(struct ata_device *adev, unsigned long xfer_mask) | ||
2121 | { | ||
2122 | /* Filter out DMA modes if the device has been configured by | ||
2123 | the BIOS as PIO only */ | ||
2124 | |||
2125 | if (adev->link->ap->ioaddr.bmdma_addr == NULL) | ||
2126 | xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); | ||
2127 | return xfer_mask; | ||
2128 | } | ||
2129 | |||
2120 | /** | 2130 | /** |
2121 | * ata_bmdma_setup - Set up PCI IDE BMDMA transaction | 2131 | * ata_bmdma_setup - Set up PCI IDE BMDMA transaction |
2122 | * @qc: Info associated with this ATA transaction. | 2132 | * @qc: Info associated with this ATA transaction. |
@@ -2335,16 +2345,6 @@ int ata_pci_clear_simplex(struct pci_dev *pdev) | |||
2335 | return 0; | 2345 | return 0; |
2336 | } | 2346 | } |
2337 | 2347 | ||
2338 | unsigned long ata_pci_default_filter(struct ata_device *adev, unsigned long xfer_mask) | ||
2339 | { | ||
2340 | /* Filter out DMA modes if the device has been configured by | ||
2341 | the BIOS as PIO only */ | ||
2342 | |||
2343 | if (adev->link->ap->ioaddr.bmdma_addr == NULL) | ||
2344 | xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); | ||
2345 | return xfer_mask; | ||
2346 | } | ||
2347 | |||
2348 | /** | 2348 | /** |
2349 | * ata_pci_init_bmdma - acquire PCI BMDMA resources and init ATA host | 2349 | * ata_pci_init_bmdma - acquire PCI BMDMA resources and init ATA host |
2350 | * @host: target ATA host | 2350 | * @host: target ATA host |
@@ -2725,6 +2725,7 @@ EXPORT_SYMBOL_GPL(ata_sff_port_ops); | |||
2725 | EXPORT_SYMBOL_GPL(ata_bmdma_port_ops); | 2725 | EXPORT_SYMBOL_GPL(ata_bmdma_port_ops); |
2726 | EXPORT_SYMBOL_GPL(ata_qc_prep); | 2726 | EXPORT_SYMBOL_GPL(ata_qc_prep); |
2727 | EXPORT_SYMBOL_GPL(ata_dumb_qc_prep); | 2727 | EXPORT_SYMBOL_GPL(ata_dumb_qc_prep); |
2728 | EXPORT_SYMBOL_GPL(ata_pci_default_filter); | ||
2728 | EXPORT_SYMBOL_GPL(ata_std_dev_select); | 2729 | EXPORT_SYMBOL_GPL(ata_std_dev_select); |
2729 | EXPORT_SYMBOL_GPL(ata_check_status); | 2730 | EXPORT_SYMBOL_GPL(ata_check_status); |
2730 | EXPORT_SYMBOL_GPL(ata_altstatus); | 2731 | EXPORT_SYMBOL_GPL(ata_altstatus); |
@@ -2760,7 +2761,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_status); | |||
2760 | EXPORT_SYMBOL_GPL(ata_bus_reset); | 2761 | EXPORT_SYMBOL_GPL(ata_bus_reset); |
2761 | #ifdef CONFIG_PCI | 2762 | #ifdef CONFIG_PCI |
2762 | EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); | 2763 | EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); |
2763 | EXPORT_SYMBOL_GPL(ata_pci_default_filter); | ||
2764 | EXPORT_SYMBOL_GPL(ata_pci_init_bmdma); | 2764 | EXPORT_SYMBOL_GPL(ata_pci_init_bmdma); |
2765 | EXPORT_SYMBOL_GPL(ata_pci_init_sff_host); | 2765 | EXPORT_SYMBOL_GPL(ata_pci_init_sff_host); |
2766 | EXPORT_SYMBOL_GPL(ata_pci_prepare_sff_host); | 2766 | EXPORT_SYMBOL_GPL(ata_pci_prepare_sff_host); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 673f34b256ba..53b8db05a1fb 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1378,6 +1378,8 @@ extern void ata_bmdma_error_handler(struct ata_port *ap); | |||
1378 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | 1378 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); |
1379 | extern int ata_sff_port_start(struct ata_port *ap); | 1379 | extern int ata_sff_port_start(struct ata_port *ap); |
1380 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 1380 | extern void ata_std_ports(struct ata_ioports *ioaddr); |
1381 | extern unsigned long ata_pci_default_filter(struct ata_device *dev, | ||
1382 | unsigned long xfer_mask); | ||
1381 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | 1383 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); |
1382 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | 1384 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); |
1383 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 1385 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
@@ -1386,8 +1388,6 @@ extern void ata_bus_reset(struct ata_port *ap); | |||
1386 | 1388 | ||
1387 | #ifdef CONFIG_PCI | 1389 | #ifdef CONFIG_PCI |
1388 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 1390 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
1389 | extern unsigned long ata_pci_default_filter(struct ata_device *dev, | ||
1390 | unsigned long xfer_mask); | ||
1391 | extern int ata_pci_init_bmdma(struct ata_host *host); | 1391 | extern int ata_pci_init_bmdma(struct ata_host *host); |
1392 | extern int ata_pci_init_sff_host(struct ata_host *host); | 1392 | extern int ata_pci_init_sff_host(struct ata_host *host); |
1393 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, | 1393 | extern int ata_pci_prepare_sff_host(struct pci_dev *pdev, |