[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=upCjze53v5STZJUz5OSrRqBU+mU3Q-C9BL18sXYAs5Q@mail.gmail.com>
Date: Tue, 29 Jan 2013 20:53:04 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arnd Bergmann <arnd.bergmann@...aro.org>
Cc: Vinod Koul <vinod.koul@...el.com>, linux-kernel@...r.kernel.org,
spear-devel <spear-devel@...t.st.com>
Subject: Re: [PATCH] dw_dmac: apply default dma_mask if needed
Adding Arnd in cc.
On 29 January 2013 20:36, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> In some cases we got the device without dma_mask configured. We have to apply
> the default value to avoid crashes during memory mapping.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> drivers/dma/dw_dmac.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index e8d0679..a572a1e 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -1673,6 +1673,12 @@ static int dw_probe(struct platform_device *pdev)
> if (IS_ERR(regs))
> return PTR_ERR(regs);
>
> + /* Apply default dma_mask if needed */
> + if (!pdev->dev.dma_mask) {
> + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
> + pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
> + }
> +
Hmm... Why is it required for a DMA controller? What kind of crash do you
get?
@Arnd: Is this change recommended?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists