Skip to contentSkip to conversation

net: dsa: Fix dsa_is_user_port() test inversion

PATCH In review Florian Fainelli 2 participants 2 messages Mar 12, 2018 – Mar 13, 2018

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

PATCH 1/1 net: dsa: Fix dsa_is_user_port() test inversion

During the conversion to dsa_is_user_port(), a condition ended up being reversed, which would prevent the creation of any user port when using the legacy binding and/or platform data, fix that.

Fixes 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")
---
 net/dsa/legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/legacy.c +1 -1
index cb54b81d0bd9..42a7b85b84e1 100644
@@ -194,7 +194,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
 		ds->ports[i].dn = cd->port_dn[i];
 		ds->ports[i].cpu_dp = dst->cpu_dp;
 
-		if (dsa_is_user_port(ds, i))
+		if (!dsa_is_user_port(ds, i))
 			continue;
 
 		ret = dsa_slave_create(&ds->ports[i]);
Signature · 1 line
2.7.4
maintainer
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Mon, 12 Mar 2018 16:00:40 -0700

Quoted 6 lines

During the conversion to dsa_is_user_port(), a condition ended up being reversed, which would prevent the creation of any user port when using the legacy binding and/or platform data, fix that.

Fixes 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")

Applied and queued up for -stable, thanks Florian.