0086-net-next-mediatek-add-next-data-pointer-coherency-pr.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 5077ac38a86023124ebbe24cd1b7ecbd0f8edaff Mon Sep 17 00:00:00 2001
  2. From: John Crispin <john@phrozen.org>
  3. Date: Tue, 3 May 2016 03:06:59 +0200
  4. Subject: [PATCH 086/102] net-next: mediatek: add next data pointer coherency
  5. protection
  6. The QDMA engine can fail to update the register pointing to the next TX
  7. descriptor if this bit does not get set in the QDMA configuration register.
  8. Not setting this bit can result in invalid values inside the TX rings
  9. registers which will causes TX stalls.
  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 | 2 +-
  14. drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 +
  15. 2 files changed, 2 insertions(+), 1 deletion(-)
  16. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  17. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  18. @@ -1292,7 +1292,7 @@ static int mtk_start_dma(struct mtk_eth
  19. mtk_w32(eth,
  20. MTK_TX_WB_DDONE | MTK_RX_DMA_EN | MTK_TX_DMA_EN |
  21. MTK_RX_2B_OFFSET | MTK_DMA_SIZE_16DWORDS |
  22. - MTK_RX_BT_32DWORDS,
  23. + MTK_RX_BT_32DWORDS | MTK_NDP_CO_PRO,
  24. MTK_QDMA_GLO_CFG);
  25. return 0;
  26. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
  27. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
  28. @@ -91,6 +91,7 @@
  29. #define MTK_QDMA_GLO_CFG 0x1A04
  30. #define MTK_RX_2B_OFFSET BIT(31)
  31. #define MTK_RX_BT_32DWORDS (3 << 11)
  32. +#define MTK_NDP_CO_PRO BIT(10)
  33. #define MTK_TX_WB_DDONE BIT(6)
  34. #define MTK_DMA_SIZE_16DWORDS (2 << 4)
  35. #define MTK_RX_DMA_BUSY BIT(3)