OSDN Git Service

net: mvpp2: cls: Write C2 TCAM data last when writing a C2 entry
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Wed, 27 Mar 2019 08:44:15 +0000 (09:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Mar 2019 18:10:58 +0000 (11:10 -0700)
commit147c538e7975ce9c6c4fdd175fd703aec4280ec8
tree1fb7ea5feeb3b75e849cc94c5aa31bd5ffa5fbf4
parente4bfb4aced83dbff6b84b7153483c038eed99939
net: mvpp2: cls: Write C2 TCAM data last when writing a C2 entry

When writing a C2 entry to hardware, some registers writes will only
take effect when the TCAM_DATA4 register is written. This includes all
C2 TCAM registers, and the C2 invalidate register.

To make sure we always write C2 entries correctly, document that
behaviour with a comment, and move TCAM writes to the end of the
mvpp2_cls_c2_write helper.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c