net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
Subsystems (3)
PATCH 1/1 net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
Make sure that we disable each of the TX and RX queues in the TDMA and RDMA control registers. This is a correctness change to be symmetrical with the code that enables the TX and RX queues.
Tested-by Maxime Ripard <[email protected]>
Fixes 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by Florian Fainelli <[email protected]>
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +6 -0
@@ -3238,15 +3238,21 @@ static void bcmgenet_get_hw_addr(struct bcmgenet_priv *priv,/* Returns a reusable dma control register value */ static u32 bcmgenet_dma_disable (struct bcmgenet_priv *priv) { +unsigned int i;u32 reg;u32 dma_ctrl;/* disable DMA */ dma_ctrl =1 << (DESC_INDEX +DMA_RING_BUF_EN_SHIFT ) |DMA_EN ; +for (i =0 ; i < priv->hw_params->tx_queues; i++) + dma_ctrl |= (1 << (i +DMA_RING_BUF_EN_SHIFT )); reg =bcmgenet_tdma_readl (priv,DMA_CTRL ); reg &= ~dma_ctrl;bcmgenet_tdma_writel (priv, reg,DMA_CTRL ); + dma_ctrl =1 << (DESC_INDEX +DMA_RING_BUF_EN_SHIFT ) |DMA_EN ; +for (i =0 ; i < priv->hw_params->rx_queues; i++) + dma_ctrl |= (1 << (i +DMA_RING_BUF_EN_SHIFT )); reg =bcmgenet_rdma_readl (priv,DMA_CTRL ); reg &= ~dma_ctrl;bcmgenet_rdma_writel (priv, reg,DMA_CTRL );
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 9 lines · On Thu, 8 Jul 2021 18:55:32 -0700 you wrote:
Make sure that we disable each of the TX and RX queues in the TDMA and RDMA control registers. This is a correctness change to be symmetrical with the code that enables the TX and RX queues.
Tested-by Maxime Ripard <[email protected]>Fixes 1c1008c793fa ("net: bcmgenet: add main driver file")Signed-off-by Florian Fainelli <[email protected]>[...]
Here is the summary with links:
- [net] net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
https://git.kernel.org/netdev/net/c/2b452550a203
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html