net: ethernet: ti: ale: add support for mac-only mode
authorGrygorii Strashko <grygorii.strashko@ti.com>
Mon, 23 Mar 2020 22:52:46 +0000 (00:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 03:01:14 +0000 (20:01 -0700)
commit6c0b849c470de5b62d3bfcd19bcc4b2009240ae3
tree112bdd618b81ccc2ff5f9012615b7f7089294cad
parent9d1f6447274f2263ff11759ded5fdc7eeb89fc68
net: ethernet: ti: ale: add support for mac-only mode

The new CPSW ALE version, available on TI K3 AM654/J721E SoCs family,
allows to switch any external port to MAC only mode. When MAC only mode
enabled this port be treated like a MAC port for the host. All traffic
received is only sent to the host. The host must direct traffic to this
port as the lookup engine will not send traffic to the ports with the
p0_maconly bit set and the p0_no_learn also set. If p0_maconly bit is set
and the p0_no_learn is not set, the host can send non-directed packets that
can be sent to the destination of a MacOnly port. It is also possible that
The host can broadcast to all ports including MacOnly ports in this mode.

This patch add ALE supprt for MAC only mode.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_ale.h