* [PATCH net-next] net: systemport: tell RXCHK if we are using Broadcom tags
@ 2014-08-28 22:11 Florian Fainelli
2014-09-02 1:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2014-08-28 22:11 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
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: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 6f4e18644bd4..8f91de169663 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: systemport: tell RXCHK if we are using Broadcom tags
2014-08-28 22:11 [PATCH net-next] net: systemport: tell RXCHK if we are using Broadcom tags Florian Fainelli
@ 2014-09-02 1:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-02 1:12 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 28 Aug 2014 15:11:03 -0700
> 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: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-02 1:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 22:11 [PATCH net-next] net: systemport: tell RXCHK if we are using Broadcom tags Florian Fainelli
2014-09-02 1:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).