[PATCH] libata-sff; Unbreak non DMA capable controllers again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-sff.c linux-2.6.23rc1-mm1/drivers/ata/libata-sff.c
--- linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-sff.c	2007-07-26 15:01:52.899754968 +0100
+++ linux-2.6.23rc1-mm1/drivers/ata/libata-sff.c	2007-07-26 15:17:55.178466368 +0100
@@ -573,6 +573,10 @@
 	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)
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux