[patch 43/47] powerpc: Add missing reference to coherent_dma_mask

From: Greg KH
Date: Tue Jul 22 2008 - 19:33:08 EST


2.6.25-stable review patch. If anyone has any objections, please let us
know.

------------------
From: Vitaly Bordug <vitb@xxxxxxxxxxxxxxxxxxx>

commit ba0fc709e197415aadd46b9ec208dc4abaa21edd upstream

There is dma_mask in of_device upon of_platform_device_create()
but we don't actually set coherent_dma_mask. This may cause weird
behavior of USB subsystem using of_device USB host drivers.

Signed-off-by: Vitaly Bordug <vitb@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/powerpc/kernel/of_platform.c | 2 ++
1 file changed, 2 insertions(+)

--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -76,6 +76,8 @@ struct of_device* of_platform_device_cre
return NULL;

dev->dma_mask = 0xffffffffUL;
+ dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+
dev->dev.bus = &of_platform_bus_type;

/* We do not fill the DMA ops for platform devices by default.

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/