Skip to content

Commit

Permalink
net: systemport: tell RXCHK if we are using Broadcom tags
Browse files Browse the repository at this point in the history
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: 80105be ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Sep 2, 2014
1 parent afb84b6 commit d09d303
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d09d303

Please sign in to comment.