netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6250_g1_vtu_loadpurge()
@ 2019-06-19 10:02 Rasmus Villemoes
  2019-06-19 14:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2019-06-19 10:02 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller
  Cc: Rasmus Villemoes, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org

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

Fixes: bec8e5725281 (net: dsa: mv88e6xxx: implement vtu_getnext and vtu_loadpurge for mv88e6250)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/net/dsa/mv88e6xxx/global1_vtu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
index 45040f963142..4f7b522e5e59 100644
--- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
+++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
@@ -444,7 +444,7 @@ int mv88e6250_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip,
 		 * VTU DBNum[5:4] are located in VTU Operation 9:8
 		 */
 		op |= entry->fid & 0x000f;
-		op |= (entry->fid & 0x0030) << 8;
+		op |= (entry->fid & 0x0030) << 4;
 	}
 
 	return mv88e6xxx_g1_vtu_op(chip, op);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6250_g1_vtu_loadpurge()
  2019-06-19 10:02 [PATCH net-next] net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6250_g1_vtu_loadpurge() Rasmus Villemoes
@ 2019-06-19 14:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-06-19 14:26 UTC (permalink / raw)
  To: rasmus.villemoes
  Cc: andrew, vivien.didelot, f.fainelli, Rasmus.Villemoes, netdev,
	linux-kernel

From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Date: Wed, 19 Jun 2019 10:02:38 +0000

> The comment is correct, but the code ends up moving the bits four
> places too far, into the VTUOp field.
> 
> Fixes: bec8e5725281 (net: dsa: mv88e6xxx: implement vtu_getnext and vtu_loadpurge for mv88e6250)
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Also applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-19 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19 10:02 [PATCH net-next] net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6250_g1_vtu_loadpurge() Rasmus Villemoes
2019-06-19 14:26 ` David Miller

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).