felix.c (93fbff1197474d7b65e598c6f48fa82a5c334539) felix.c (36a0bf44358597dee6947938e8643c61442cab87)
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright 2019-2021 NXP
3 *
4 * This is an umbrella module for all network switches that are
5 * register-compatible with Ocelot and that perform I/O to their host CPU
6 * through an NPI (Node Processor Interface) Ethernet port.
7 */
8#include <uapi/linux/if_bridge.h>

--- 431 unchanged lines hidden (view full) ---

440 struct ocelot *ocelot = ds->priv;
441 struct dsa_port *dp;
442 int err;
443
444 err = dsa_tag_8021q_register(ds, htons(ETH_P_8021AD));
445 if (err)
446 return err;
447
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright 2019-2021 NXP
3 *
4 * This is an umbrella module for all network switches that are
5 * register-compatible with Ocelot and that perform I/O to their host CPU
6 * through an NPI (Node Processor Interface) Ethernet port.
7 */
8#include <uapi/linux/if_bridge.h>

--- 431 unchanged lines hidden (view full) ---

440 struct ocelot *ocelot = ds->priv;
441 struct dsa_port *dp;
442 int err;
443
444 err = dsa_tag_8021q_register(ds, htons(ETH_P_8021AD));
445 if (err)
446 return err;
447
448 dsa_switch_for_each_cpu_port(dp, ds)
449 ocelot_port_setup_dsa_8021q_cpu(ocelot, dp->index);
450
448 dsa_switch_for_each_user_port(dp, ds)
449 ocelot_port_assign_dsa_8021q_cpu(ocelot, dp->index,
450 dp->cpu_dp->index);
451
452 dsa_switch_for_each_available_port(dp, ds)
453 /* This overwrites ocelot_init():
454 * Do not forward BPDU frames to the CPU port module,
455 * for 2 reasons:

--- 32 unchanged lines hidden (view full) ---

488 ocelot_write_gix(ocelot,
489 ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA(0xffff),
490 ANA_PORT_CPU_FWD_BPDU_CFG,
491 dp->index);
492
493 dsa_switch_for_each_user_port(dp, ds)
494 ocelot_port_unassign_dsa_8021q_cpu(ocelot, dp->index);
495
451 dsa_switch_for_each_user_port(dp, ds)
452 ocelot_port_assign_dsa_8021q_cpu(ocelot, dp->index,
453 dp->cpu_dp->index);
454
455 dsa_switch_for_each_available_port(dp, ds)
456 /* This overwrites ocelot_init():
457 * Do not forward BPDU frames to the CPU port module,
458 * for 2 reasons:

--- 32 unchanged lines hidden (view full) ---

491 ocelot_write_gix(ocelot,
492 ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA(0xffff),
493 ANA_PORT_CPU_FWD_BPDU_CFG,
494 dp->index);
495
496 dsa_switch_for_each_user_port(dp, ds)
497 ocelot_port_unassign_dsa_8021q_cpu(ocelot, dp->index);
498
499 dsa_switch_for_each_cpu_port(dp, ds)
500 ocelot_port_teardown_dsa_8021q_cpu(ocelot, dp->index);
501
496 dsa_tag_8021q_unregister(ds);
497}
498
499static unsigned long felix_tag_8021q_get_host_fwd_mask(struct dsa_switch *ds)
500{
501 return dsa_cpu_ports(ds);
502}
503

--- 1428 unchanged lines hidden ---
502 dsa_tag_8021q_unregister(ds);
503}
504
505static unsigned long felix_tag_8021q_get_host_fwd_mask(struct dsa_switch *ds)
506{
507 return dsa_cpu_ports(ds);
508}
509

--- 1428 unchanged lines hidden ---