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

From: Michael Buesch
Date: Thu Jun 12 2008 - 08:53:06 EST


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.


> Signed-off-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
> ---
> 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.
--
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/