aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mscc/ocelot_board.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2019-11-09 15:03:00 +0200
committerDavid S. Miller <davem@davemloft.net>2019-11-11 12:59:10 -0800
commit21468199016f4e4983c7c22368d1cfba3914facb (patch)
treef885e56527e0a0100c4b5186426706409eac4b50 /drivers/net/ethernet/mscc/ocelot_board.c
parentnet: mscc: ocelot: refactor adjust_link into a netdev-independent function (diff)
downloadlinux-dev-21468199016f4e4983c7c22368d1cfba3914facb.tar.xz
linux-dev-21468199016f4e4983c7c22368d1cfba3914facb.zip
net: mscc: ocelot: split assignment of the cpu port into a separate function
Now that the places that configure routing destinations for the CPU port have been marked as such, allow callers to specify their own CPU port that is different than ocelot->num_phys_ports. A user will be the Felix DSA driver, where the CPU port is one of the physical ports (NPI mode). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_board.c')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_board.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c
index 9985fb334aac..811599f32910 100644
--- a/drivers/net/ethernet/mscc/ocelot_board.c
+++ b/drivers/net/ethernet/mscc/ocelot_board.c
@@ -365,6 +365,8 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
sizeof(struct ocelot_port *), GFP_KERNEL);
ocelot_init(ocelot);
+ ocelot_set_cpu_port(ocelot, ocelot->num_phys_ports,
+ OCELOT_TAG_PREFIX_NONE, OCELOT_TAG_PREFIX_NONE);
for_each_available_child_of_node(ports, portnp) {
struct ocelot_port_private *priv;