]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6185_g1_vtu_loadpurge()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 19 Jun 2019 10:02:13 +0000 (10:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jul 2019 06:09:46 +0000 (08:09 +0200)
[ Upstream commit 48620e341659f6e4b978ec229f6944dabe6df709 ]

The comment is correct, but the code ends up moving the bits four
places too far, into the VTUOp field.

Fixes: 11ea809f1a74 (net: dsa: mv88e6xxx: support 256 databases)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mv88e6xxx/global1_vtu.c

index 058326924f3e2f955161f77bfbc7a7fbcb6d65f1..7a6667e0b9f9ce6466c9fa70da78b7ae41db887d 100644 (file)
@@ -419,7 +419,7 @@ int mv88e6185_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip,
                 * VTU DBNum[7:4] are located in VTU Operation 11:8
                 */
                op |= entry->fid & 0x000f;
-               op |= (entry->fid & 0x00f0) << 8;
+               op |= (entry->fid & 0x00f0) << 4;
        }
 
        return mv88e6xxx_g1_vtu_op(chip, op);