netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch, vivien.didelot@gmail.com,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net 3/5] net: systemport: Fix reception of BPDUs
Date: Fri, 15 Feb 2019 12:16:51 -0800	[thread overview]
Message-ID: <20190215201653.20988-4-f.fainelli@gmail.com> (raw)
In-Reply-To: <20190215201653.20988-1-f.fainelli@gmail.com>

SYSTEMPORT has its RXCHK parser block that attempts to validate the
packet structures, unfortunately setting the L2 header check bit will
cause Bridge PDUs (BPDUs) to be incorrectly rejected because they look
like LLC/SNAP packets with a non-IPv4 or non-IPv6 Ethernet Type.

Fixes: 4e8aedfe78c7 ("net: systemport: Turn on offloads by default")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 28c9b0bdf2f6..bc3ac369cbe3 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -134,6 +134,10 @@ static void bcm_sysport_set_rx_csum(struct net_device *dev,
 
 	priv->rx_chk_en = !!(wanted & NETIF_F_RXCSUM);
 	reg = rxchk_readl(priv, RXCHK_CONTROL);
+	/* Clear L2 header checks, which would prevent BPDUs
+	 * from being received.
+	 */
+	reg &= ~RXCHK_L2_HDR_DIS;
 	if (priv->rx_chk_en)
 		reg |= RXCHK_EN;
 	else
-- 
2.17.1


  parent reply	other threads:[~2019-02-15 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 20:16 [PATCH net 0/5] net: dsa: b53: VLAN and L2 fixes Florian Fainelli
2019-02-15 20:16 ` [PATCH net 1/5] net: dsa: b53: Fix default VLAN ID Florian Fainelli
2019-02-15 20:16 ` [PATCH net 2/5] net: dsa: b53: Properly account for VLAN filtering Florian Fainelli
2019-02-15 20:16 ` Florian Fainelli [this message]
2019-02-15 20:16 ` [PATCH net 4/5] net: dsa: bcm_sf2: Do not assume DSA master supports WoL Florian Fainelli
2019-02-15 20:16 ` [PATCH net 5/5] net: dsa: b53: Do not program CPU port's PVID Florian Fainelli
2019-02-16  4:38 ` [PATCH net 0/5] net: dsa: b53: VLAN and L2 fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190215201653.20988-4-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).