Skip to content

Commit 43f4a20

Browse files
stefanchulskikuba-moo
authored andcommitted
net: mvpp2: TCAM entry enable should be written after SRAM data
Last TCAM data contains TCAM enable bit. It should be written after SRAM data before entry enabled. Fixes: 3f51850 ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 88c7a9f commit 43f4a20

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe)
2929
/* Clear entry invalidation bit */
3030
pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK;
3131

32-
/* Write tcam index - indirect access */
33-
mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
34-
for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
35-
mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
36-
3732
/* Write sram index - indirect access */
3833
mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index);
3934
for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++)
4035
mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]);
4136

37+
/* Write tcam index - indirect access */
38+
mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index);
39+
for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++)
40+
mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]);
41+
4242
return 0;
4343
}
4444

0 commit comments

Comments
 (0)