realtek: Trap all frames with switch as destination to CPU-port
This fixes a bug where frames sent to the switch itself were
flooded to all ports unless the MAC address of the CPU-port
was learned otherwise.
Tested-by: Wenli Looi <wlooi@ucalgary.ca>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
[fix code formatting]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 98bb26f9f7
)
This commit is contained in:
parent
1c6a179e1a
commit
7b4702afef
1 changed files with 9 additions and 0 deletions
|
@ -205,6 +205,15 @@ static int rtl83xx_setup(struct dsa_switch *ds)
|
||||||
|
|
||||||
priv->r->l2_learning_setup();
|
priv->r->l2_learning_setup();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure all frames sent to the switch's MAC are trapped to the CPU-port
|
||||||
|
* 0: FWD, 1: DROP, 2: TRAP2CPU
|
||||||
|
*/
|
||||||
|
if (priv->family_id == RTL8380_FAMILY_ID)
|
||||||
|
sw_w32(0x2, RTL838X_SPCL_TRAP_SWITCH_MAC_CTRL);
|
||||||
|
else
|
||||||
|
sw_w32(0x2, RTL839X_SPCL_TRAP_SWITCH_MAC_CTRL);
|
||||||
|
|
||||||
/* Enable MAC Polling PHY again */
|
/* Enable MAC Polling PHY again */
|
||||||
rtl83xx_enable_phy_polling(priv);
|
rtl83xx_enable_phy_polling(priv);
|
||||||
pr_debug("Please wait until PHY is settled\n");
|
pr_debug("Please wait until PHY is settled\n");
|
||||||
|
|
Loading…
Reference in a new issue