0060-net-mediatek-remove-incorrect-dma_mask-assignment.patch 1.2 KB

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