Commit 3923d68d authored by David S. Miller's avatar David S. Miller

Merge branch 'dsa-net'

Andrew Lunn says:

====================
DSA tagging mismatches

The second patch is a fix, which should be applied to -rc. It is
possible to get a DSA configuration which does not work. The patch
stops this happening.

The first patch detects this situation, and errors out the probe of
DSA, making it more obvious something is wrong. It is not required to
apply it -rc.

v2 fixes the use case pointed out by Florian, that a switch driver
may use DSA_TAG_PROTO_NONE which the patch did not correctly handle.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f89b7755 c146b778
...@@ -395,7 +395,7 @@ static int mv88e6171_get_sset_count(struct dsa_switch *ds) ...@@ -395,7 +395,7 @@ static int mv88e6171_get_sset_count(struct dsa_switch *ds)
} }
struct dsa_switch_driver mv88e6171_switch_driver = { struct dsa_switch_driver mv88e6171_switch_driver = {
.tag_protocol = DSA_TAG_PROTO_DSA, .tag_protocol = DSA_TAG_PROTO_EDSA,
.priv_size = sizeof(struct mv88e6xxx_priv_state), .priv_size = sizeof(struct mv88e6xxx_priv_state),
.probe = mv88e6171_probe, .probe = mv88e6171_probe,
.setup = mv88e6171_setup, .setup = mv88e6171_setup,
......
...@@ -174,8 +174,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index, ...@@ -174,8 +174,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
dst->rcv = brcm_netdev_ops.rcv; dst->rcv = brcm_netdev_ops.rcv;
break; break;
#endif #endif
default: case DSA_TAG_PROTO_NONE:
break; break;
default:
ret = -ENOPROTOOPT;
goto out;
} }
dst->tag_protocol = drv->tag_protocol; dst->tag_protocol = drv->tag_protocol;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment