提交 370e0a71 编写于 作者: N NeilBrown 提交者: Greg Kroah-Hartman

staging: mt7621-eth: set correct dma mask.

Since commit f8c55dc6 ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the eth
driver fails because the dma mask is set on the wrong 'struct device'.

Move the setting to the correct struct device.
Signed-off-by: NNeilBrown <neil@brown.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 852b2876
......@@ -1689,6 +1689,8 @@ static int mtk_open(struct net_device *dev)
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
if (!atomic_read(&eth->dma_refcnt)) {
int err = mtk_start_dma(eth);
......@@ -2062,9 +2064,6 @@ static int mtk_probe(struct platform_device *pdev)
struct clk *sysclk;
int err;
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
device_reset(&pdev->dev);
match = of_match_device(of_mtk_match, &pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册