]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 25 Jan 2021 15:04:48 +0000 (16:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 Jan 2021 01:58:28 +0000 (17:58 -0800)
commit532557694b9a8cd50488a158394a64702100afdd
tree308ec9064b0030a47c6359bc1cbdaa60f770ef78
parent23a9ad04a007501cecf2ba95d049fa7a7efb6437
net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250

mv88e6250_g1_vtu_getnext is almost identical to
mv88e6185_g1_vtu_getnext, except for the 6250 only having 64 databases
instead of 256. We can reduce code duplication by simply masking off
the extra two garbage bits when assembling the fid from VTU op [3:0]
and [11:8].

Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com>
Tested-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global1.h
drivers/net/dsa/mv88e6xxx/global1_vtu.c