net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
[ Upstream commit7bcad0f0e6
] Do not set the MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP bit on CPU or DSA ports. This allows the host CPU port to be a regular IGMP listener by sending out IGMP Membership Reports, which would otherwise not be forwarded by the mv88exxx chip, but directly looped back to the CPU port itself. Fixes:54d792f257
("net: dsa: Centralise global and port setup code into mv88e6xxx.") Signed-off-by: Steffen Bätz <steffen@innosonix.de> Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20230329150140.701559-1-festevam@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
09119a9f1b
commit
3b366c8e2f
@ -2237,9 +2237,14 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
|||||||
* If this is the upstream port for this switch, enable
|
* If this is the upstream port for this switch, enable
|
||||||
* forwarding of unknown unicasts and multicasts.
|
* forwarding of unknown unicasts and multicasts.
|
||||||
*/
|
*/
|
||||||
reg = MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP |
|
reg = MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
||||||
MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
|
||||||
MV88E6XXX_PORT_CTL0_STATE_FORWARDING;
|
MV88E6XXX_PORT_CTL0_STATE_FORWARDING;
|
||||||
|
/* Forward any IPv4 IGMP or IPv6 MLD frames received
|
||||||
|
* by a USER port to the CPU port to allow snooping.
|
||||||
|
*/
|
||||||
|
if (dsa_is_user_port(ds, port))
|
||||||
|
reg |= MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP;
|
||||||
|
|
||||||
err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL0, reg);
|
err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL0, reg);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
Reference in New Issue
Block a user