diff options
author | David S. Miller <davem@davemloft.net> | 2014-10-28 15:28:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-28 15:28:30 -0400 |
commit | 3923d68dc05033aa843b67d73110a6d402ac6e14 (patch) | |
tree | 84f2b9557b6d513f6127056949b4477af152c460 /net | |
parent | f89b7755f517cdbb755d7543eef986ee9d54e654 (diff) | |
parent | c146b7788e5721ec15bc0197bedf75849508e7ea (diff) | |
download | linux-stable-3923d68dc05033aa843b67d73110a6d402ac6e14.tar.gz linux-stable-3923d68dc05033aa843b67d73110a6d402ac6e14.tar.bz2 linux-stable-3923d68dc05033aa843b67d73110a6d402ac6e14.zip |
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa/dsa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 22f34cf4cb27..6317b41c99b0 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -174,8 +174,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index, dst->rcv = brcm_netdev_ops.rcv; break; #endif - default: + case DSA_TAG_PROTO_NONE: break; + default: + ret = -ENOPROTOOPT; + goto out; } dst->tag_protocol = drv->tag_protocol; |