提交 a70df146 编写于 作者: A Alexandre Bailon 提交者: Greg Kroah-Hartman

usb: musb: musb_cppi41: Defer probe only if DMA is not ready

If dma_request_slave_channel() failed to return a channel,
then the driver will print an error and request to defer probe,
regardless of the cause of the failure.
Defer if the DMA is not ready yet otherwise print an error.
Signed-off-by: NAlexandre Bailon <abailon@baylibre.com>
Reviewed-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NBin Liu <b-liu@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 24040a58
无相关合并请求
......@@ -673,12 +673,15 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
musb_dma->status = MUSB_DMA_STATUS_FREE;
musb_dma->max_len = SZ_4M;
dc = dma_request_slave_channel(dev->parent, str);
if (!dc) {
dev_err(dev, "Failed to request %s.\n", str);
ret = -EPROBE_DEFER;
dc = dma_request_chan(dev->parent, str);
if (IS_ERR(dc)) {
ret = PTR_ERR(dc);
if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to request %s: %d.\n",
str, ret);
goto err;
}
cppi41_channel->dc = dc;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部