Skip to contentSkip to conversation

net: ll_temac: Handle DMA halt condition caused by buffer underrun

PATCH In review Esben Haabendal 1 participant 1 message Feb 18, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 4/8 net: ll_temac: Handle DMA halt condition caused by buffer underrun

The SDMA engine used by TEMAC halts operation when it has finished processing of the last buffer descriptor in the buffer ring. Unfortunately, no interrupt event is generated when this happens, so we need to setup another mechanism to make sure DMA operation is restarted when enough buffers have been added to the ring.

---
 drivers/net/ethernet/xilinx/ll_temac.h      |  3 ++
 drivers/net/ethernet/xilinx/ll_temac_main.c | 47 ++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
drivers/net/ethernet/xilinx/ll_temac.h +3 -0
index 99fe059e5c7f..53fb8141f1a6 100644
@@ -380,6 +380,9 @@ struct temac_local {
 	/* DMA channel control setup */
 	u32 tx_chnl_ctrl;
 	u32 rx_chnl_ctrl;
+	u8 coalesce_count_rx;
+
+	struct delayed_work restart_work;
 };
 
 /* Wrappers for temac_ior()/temac_iow() function pointers above */
drivers/net/ethernet/xilinx/ll_temac_main.c +45 -2

98 lines not on this page · raw message

Signature · 1 line
2.25.0