* [PATCH net] net: mvpp2: TCAM entry enable should be written after SRAM data
@ 2021-02-01 9:35 stefanc
2021-02-02 16:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: stefanc @ 2021-02-01 9:35 UTC (permalink / raw)
To: netdev
Cc: thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel, stefanc,
kuba, linux, mw, andrew, rmk+kernel, atenart
From: Stefan Chulski <stefanc@marvell.com>
Last TCAM data contains TCAM enable bit.
It should be written after SRAM data before entry enabled.
Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
index 0b2ff08..f4a905f 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
@@ -29,16 +29,16 @@ static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe)
/* Clear entry invalidation bit */
pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK;
- /* Write tcam index - indirect access */
- mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
- for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
- mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
-
/* Write sram index - indirect access */
mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index);
for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++)
mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]);
+ /* Write tcam index - indirect access */
+ mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
+ for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
+ mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
+
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: mvpp2: TCAM entry enable should be written after SRAM data
2021-02-01 9:35 [PATCH net] net: mvpp2: TCAM entry enable should be written after SRAM data stefanc
@ 2021-02-02 16:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-02 16:50 UTC (permalink / raw)
To: Stefan Chulski
Cc: netdev, thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel,
kuba, linux, mw, andrew, rmk+kernel, atenart
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Mon, 1 Feb 2021 11:35:39 +0200 you wrote:
> From: Stefan Chulski <stefanc@marvell.com>
>
> Last TCAM data contains TCAM enable bit.
> It should be written after SRAM data before entry enabled.
>
> Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
> Signed-off-by: Stefan Chulski <stefanc@marvell.com>
>
> [...]
Here is the summary with links:
- [net] net: mvpp2: TCAM entry enable should be written after SRAM data
https://git.kernel.org/netdev/net/c/43f4a20a1266
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-02-02 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 9:35 [PATCH net] net: mvpp2: TCAM entry enable should be written after SRAM data stefanc
2021-02-02 16:50 ` 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).