Skip to contentSkip to conversation

dsa: mv88e6171: Fix tag_protocol check

PATCH Applied Guenter Roeck 4 participants 4 messages Oct 14, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dsa: mv88e6171: Fix tag_protocol check

tag_protocol is now an enum, so drivers have to check against it.

---
 drivers/net/dsa/mv88e6171.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/mv88e6171.c +1 -1
index 6365e30..1020a7a 100644
@@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
 	 */
 	val = 0x0433;
 	if (dsa_is_cpu_port(ds, p)) {
-		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
+		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
 			val |= 0x3300;
 		else
 			val |= 0x0100;
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Guenter Roeck

tag_protocol is now an enum, so drivers have to check against it.

Good catch, this driver got merged right in the middle of my changes from __be16 to an enum and this slipped through.

Quoted 3 lines
Fixes 42f272539487e49c9ea830ad97db41eb9937d5dc ("net: DSA: Marvell

mv88e6171 switch driver")

Quoted 18 lines
---
 drivers/net/dsa/mv88e6171.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/mv88e6171.c +1 -1
index 6365e30..1020a7a 100644
@@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
 	 */
 	val = 0x0433;
 	if (dsa_is_cpu_port(ds, p)) {
-		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
+		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
 			val |= 0x3300;
 		else
 			val |= 0x0100;
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Guenter Roeck
Quoted 4 lines · Guenter Roeck

tag_protocol is now an enum, so drivers have to check against it.

Thanks for fixing this.

Andrew

Quoted 20 lines
---
 drivers/net/dsa/mv88e6171.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/mv88e6171.c +1 -1
index 6365e30..1020a7a 100644
@@ -206,7 +206,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
 	 */
 	val = 0x0433;
 	if (dsa_is_cpu_port(ds, p)) {
-		if (ds->dst->tag_protocol == htons(ETH_P_EDSA))
+		if (ds->dst->tag_protocol == DSA_TAG_PROTO_EDSA)
 			val |= 0x3300;
 		else
 			val |= 0x0100;
Signature · 1 line
1.9.1