Thread (1 message) 1 message, 1 author, 2008-06-12

Re: [PATCH] ssb: Partial revert of 4ac5846 to fix coherent DMA mask setting

From: Michael Buesch <hidden>
Date: 2008-06-12 12:53:06
Also in: lkml

On Thursday 12 June 2008 14:42:02 Kirill A. Shutemov wrote:
dma_set_mask() doesn't set coherent_dma_mask, this can cause
strange error like "powering down PHY" in b44(bz #10473).

At x86_64 this error had been hidden until aa99b16.
This patch is wrong. I will send the right patch soon.

quoted hunk
Signed-off-by: Kirill A. Shutemov <redacted>
---
 drivers/ssb/main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 7cf8851..b7fbbc4 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1170,8 +1170,9 @@ int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
 	struct device *dma_dev = ssb_dev->dma_dev;
 
 #ifdef CONFIG_SSB_PCIHOST
-	if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
-		return dma_set_mask(dma_dev, mask);
+	if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI &&
+	    !dma_supported(dma_dev, mask))
+		return -EIO;
 #endif
 	dma_dev->coherent_dma_mask = mask;
 	dma_dev->dma_mask = &dma_dev->coherent_dma_mask;


-- 
Greetings Michael.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help