56c980981514ca0e9f4e5f9b1e23353c7e4ab07b
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.4 / 0060-net-mediatek-remove-incorrect-dma_mask-assignment.patch
1 From 8473af12d5aa34613070447d6fd8f785f31301de Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Mon, 14 Mar 2016 15:07:11 +0100
4 Subject: [PATCH 060/102] net: mediatek: remove incorrect dma_mask assignment
5
6 Device drivers should not mess with the DMA mask directly,
7 but instead call dma_set_mask() etc if needed.
8
9 In case of the mtk_eth_soc driver, the mask already gets set
10 correctly when the device is created, and setting it again
11 is against the documented API.
12
13 This removes the incorrect setting.
14
15 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 ---
17 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ---
18 1 file changed, 3 deletions(-)
19
20 diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
21 index a005bc4..fcd4ed7 100644
22 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
23 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
24 @@ -1678,9 +1678,6 @@ static int mtk_probe(struct platform_device *pdev)
25 struct mtk_eth *eth;
26 int err;
27
28 - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
29 - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
30 -
31 device_reset(&pdev->dev);
32
33 match = of_match_device(of_mtk_match, &pdev->dev);
34 --
35 1.7.10.4
36