Commit 6fdc99a2 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik

libata-sff; Unbreak non DMA capable controllers again

Seems nobody else is checking/testing this case as it keeps getting
horked.

If we have no BAR4 mapping on an SFF controller this is *NOT* an error,
it just means it isn't doing BMDMA.
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent dbf0c89c
...@@ -573,6 +573,10 @@ int ata_pci_init_bmdma(struct ata_host *host) ...@@ -573,6 +573,10 @@ int ata_pci_init_bmdma(struct ata_host *host)
struct pci_dev *pdev = to_pci_dev(gdev); struct pci_dev *pdev = to_pci_dev(gdev);
int i, rc; int i, rc;
/* No BAR4 allocation: No DMA */
if (pci_resource_start(pdev, 4) == 0)
return 0;
/* TODO: If we get no DMA mask we should fall back to PIO */ /* TODO: If we get no DMA mask we should fall back to PIO */
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc) if (rc)
......
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