0093-net-next-mediatek-remove-superfluous-register-reads.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 31428406bf4b9da2a322ae947096414ff0489fb5 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <john@phrozen.org>
  3. Date: Tue, 3 May 2016 03:57:01 +0200
  4. Subject: [PATCH 093/102] net-next: mediatek: remove superfluous register
  5. reads
  6. The driver was originally written for MIPS based SoC. These required the
  7. IRQ mask register to be read after writing it to ensure that the content
  8. was actually applied. As this version only works on ARM based SoC, we can
  9. safely remove the 2 reads as they ware not required.
  10. Signed-off-by: Sean Wang <keyhaede@gmail.com>
  11. Signed-off-by: John Crispin <john@phrozen.org>
  12. ---
  13. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ----
  14. 1 file changed, 4 deletions(-)
  15. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  16. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  17. @@ -335,8 +335,6 @@ static inline void mtk_irq_disable(struc
  18. val = mtk_r32(eth, MTK_QDMA_INT_MASK);
  19. mtk_w32(eth, val & ~mask, MTK_QDMA_INT_MASK);
  20. - /* flush write */
  21. - mtk_r32(eth, MTK_QDMA_INT_MASK);
  22. }
  23. static inline void mtk_irq_enable(struct mtk_eth *eth, u32 mask)
  24. @@ -345,8 +343,6 @@ static inline void mtk_irq_enable(struct
  25. val = mtk_r32(eth, MTK_QDMA_INT_MASK);
  26. mtk_w32(eth, val | mask, MTK_QDMA_INT_MASK);
  27. - /* flush write */
  28. - mtk_r32(eth, MTK_QDMA_INT_MASK);
  29. }
  30. static int mtk_set_mac_address(struct net_device *dev, void *p)