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

12345678910111213141516171819202122232425262728293031
  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. 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 <arnd@arndb.de>
  12. ---
  13. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ---
  14. 1 file changed, 3 deletions(-)
  15. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  16. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  17. @@ -1678,9 +1678,6 @@ static int mtk_probe(struct platform_dev
  18. struct mtk_eth *eth;
  19. int err;
  20. - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
  21. - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
  22. -
  23. device_reset(&pdev->dev);
  24. match = of_match_device(of_mtk_match, &pdev->dev);