Skip to content

Commit

Permalink
libata-sff; Unbreak non DMA capable controllers again
Browse files Browse the repository at this point in the history
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: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Aug 1, 2007
1 parent dbf0c89 commit 6fdc99a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ int ata_pci_init_bmdma(struct ata_host *host)
struct pci_dev *pdev = to_pci_dev(gdev);
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 */
rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
if (rc)
Expand Down

0 comments on commit 6fdc99a

Please sign in to comment.