diff mbox series

[net,v2,1/2] net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port

Message ID 20200821134912.30008-1-m-karicheri2@ti.com
State Superseded
Headers show
Series [net,v2,1/2] net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port | expand

Commit Message

Murali Karicheri Aug. 21, 2020, 1:49 p.m. UTC
To flush the vid + mc entries from ALE, which is required when a VLAN
interface is removed, driver needs to call cpsw_ale_flush_multicast()
with ALE_PORT_HOST for port mask as these entries are added only for
host port. Without this, these entries remain in the ALE table even
after removing the VLAN interface. cpsw_ale_flush_multicast() calls
cpsw_ale_flush_mcast which expects a port mask to do the job.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>

---
 v2: Dropped 3/3 and re-sending as it need more work
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Jesse Brandeburg Aug. 21, 2020, 7:59 p.m. UTC | #1
Murali Karicheri wrote:

> To flush the vid + mc entries from ALE, which is required when a VLAN

> interface is removed, driver needs to call cpsw_ale_flush_multicast()

> with ALE_PORT_HOST for port mask as these entries are added only for

> host port. Without this, these entries remain in the ALE table even

> after removing the VLAN interface. cpsw_ale_flush_multicast() calls

> cpsw_ale_flush_mcast which expects a port mask to do the job.

> 

> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>


Patch makes sense. Please resend with a Fixes: tag.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 9b17bbbe102f..4a65edc5a375 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1116,7 +1116,7 @@  static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev,
 				  HOST_PORT_NUM, ALE_VLAN, vid);
 	ret |= cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast,
 				  0, ALE_VLAN, vid);
-	ret |= cpsw_ale_flush_multicast(cpsw->ale, 0, vid);
+	ret |= cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid);
 err:
 	pm_runtime_put(cpsw->dev);
 	return ret;