* [PATCH net] net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
@ 2021-07-09 1:55 Florian Fainelli
2021-07-09 2:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2021-07-09 1:55 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Maxime Ripard, Doug Berger, David S. Miller,
Jakub Kicinski, open list:BROADCOM GENET ETHERNET DRIVER,
open list
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 <maxime@cerno.tech>
Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 35e9956e930c..db74241935ab 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: bcmgenet: Ensure all TX/RX queues DMAs are disabled
2021-07-09 1:55 [PATCH net] net: bcmgenet: Ensure all TX/RX queues DMAs are disabled Florian Fainelli
@ 2021-07-09 2:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-09 2:40 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, maxime, opendmb, davem, kuba, bcm-kernel-feedback-list,
linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
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 <maxime@cerno.tech>
> Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>
> [...]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-09 2:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 1:55 [PATCH net] net: bcmgenet: Ensure all TX/RX queues DMAs are disabled Florian Fainelli
2021-07-09 2:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).