linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata-sff; Unbreak non DMA capable controllers again
@ 2007-07-26 17:41 Alan Cox
  2007-08-01 14:01 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-07-26 17:41 UTC (permalink / raw)
  To: akpm, linux-ide

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>

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libata-sff; Unbreak non DMA capable controllers again
  2007-07-26 17:41 [PATCH] libata-sff; Unbreak non DMA capable controllers again Alan Cox
@ 2007-08-01 14:01 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-08-01 14:01 UTC (permalink / raw)
  To: Alan Cox; +Cc: akpm, linux-ide

Alan Cox wrote:
> 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>

applied to #upstream-fixes



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-01 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 17:41 [PATCH] libata-sff; Unbreak non DMA capable controllers again Alan Cox
2007-08-01 14:01 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).