]> git.baikalelectronics.ru Git - kernel.git/commit
net:ethernet:adi:adin1110: Fix forwarding offload
authorCiprian Regus <ciprian.regus@analog.com>
Fri, 8 Sep 2023 12:58:08 +0000 (15:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:08 +0000 (12:28 +0200)
commit66e79c2f3a9358b9191d14683f5296fcc6e26f28
tree353699d34400b0c81a9b52ea1325cab3f07efabd
parentc281948cebcccf275afbec7cb03adb68d39288e7
net:ethernet:adi:adin1110: Fix forwarding offload

[ Upstream commit 32530dba1bd48da4437d18d9a8dbc9d2826938a6 ]

Currently, when a new fdb entry is added (with both ports of the
ADIN2111 bridged), the driver configures the MAC filters for the wrong
port, which results in the forwarding being done by the host, and not
actually hardware offloaded.

The ADIN2111 offloads the forwarding by setting filters on the
destination MAC address of incoming frames. Based on these, they may be
routed to the other port. Thus, if a frame has to be forwarded from port
1 to port 2, the required configuration for the ADDR_FILT_UPRn register
should set the APPLY2PORT1 bit (instead of APPLY2PORT2, as it's
currently the case).

Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/adi/adin1110.c