提交 d09d3038 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: systemport: tell RXCHK if we are using Broadcom tags

When Broadcom tags are enabled, e.g: when interfaced to an Ethernet
switch, make sure that we tell the RXCHK engine that it should be
expecting a 4-bytes Broadcom tag after the Ethernet MAC Source Address.

Use netdev_uses_dsa() to check for that condition since that will tell
us if a switch is attached to our network interface.

Fixes: 80105bef ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 afb84b62
......@@ -139,6 +139,15 @@ static int bcm_sysport_set_rx_csum(struct net_device *dev,
else
reg &= ~RXCHK_SKIP_FCS;
/* If Broadcom tags are enabled (e.g: using a switch), make
* sure we tell the RXCHK hardware to expect a 4-bytes Broadcom
* tag after the Ethernet MAC Source Address.
*/
if (netdev_uses_dsa(dev))
reg |= RXCHK_BRCM_TAG_EN;
else
reg &= ~RXCHK_BRCM_TAG_EN;
rxchk_writel(priv, reg, RXCHK_CONTROL);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册