summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-01 10:07:50 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-01 10:07:50 -0700
commit29fda25a2d31098044f8dfa177c4d2834071828e (patch)
tree9e4be11c49a4405c19ece8f81fbb1db478da1055 /net/dsa
parentbb1182bc3e5956a93ab3ef8a3cbfb7966c42a94a (diff)
parentbc78d646e708dabd1744ca98744dea316f459497 (diff)
downloadop-kernel-dev-29fda25a2d31098044f8dfa177c4d2834071828e.zip
op-kernel-dev-29fda25a2d31098044f8dfa177c4d2834071828e.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two minor conflicts in virtio_net driver (bug fix overlapping addition of a helper) and MAINTAINERS (new driver edit overlapping revamp of PHY entry). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 56e4609..c442051 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -509,21 +509,22 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
dst->cpu_dp->netdev = ethernet_dev;
}
+ /* Initialize cpu_port_mask now for drv->setup()
+ * to have access to a correct value, just like what
+ * net/dsa/dsa.c::dsa_switch_setup_one does.
+ */
+ ds->cpu_port_mask |= BIT(index);
+
tag_protocol = ds->ops->get_tag_protocol(ds);
dst->tag_ops = dsa_resolve_tag_protocol(tag_protocol);
if (IS_ERR(dst->tag_ops)) {
dev_warn(ds->dev, "No tagger for this switch\n");
+ ds->cpu_port_mask &= ~BIT(index);
return PTR_ERR(dst->tag_ops);
}
dst->rcv = dst->tag_ops->rcv;
- /* Initialize cpu_port_mask now for drv->setup()
- * to have access to a correct value, just like what
- * net/dsa/dsa.c::dsa_switch_setup_one does.
- */
- ds->cpu_port_mask |= BIT(index);
-
return 0;
}
OpenPOWER on IntegriCloud