Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3244758imc; Wed, 13 Mar 2019 12:34:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8kL49asTKtKfWuxMkDDgYnlvQjOEo+1LJJV3VikFLGetlLg7GMML+NHUsIHeMjlRTLOrL X-Received: by 2002:a63:5321:: with SMTP id h33mr13082153pgb.168.1552505695617; Wed, 13 Mar 2019 12:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552505695; cv=none; d=google.com; s=arc-20160816; b=nz8jQK1z7nmI/oRC9lDbWeYVFM7XSPtOqCVWVpUxkDB2+hxmU6CT/9o80e+7j7vLUc 7DyrKEZQSGkorcDuwBDCMbmGSzDI9VZKToSkemttUzFBjQXfGUHYGkXiWMv5DXs5atNw o5+HWlrwnHkTtp5wDiQQA0dSPgMHLTZnn8uX1Aq9JrRE/sadK8/HKAkPZ7Mr71wDnWuj uLPUHsiPRIMOeM0YFD7/Os6/AWi+bMQv5FTAEVf0pozDRSrllhH3k5rBbxLUQOrUPdjC TNzEw25hp0mtd6Pb7Q44/IReOgUbD21Yzw3X/mILbbSy+/oaVtLPic8m/6CseOcLsjNA GjQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OBXQFD1aILv6vIYoc9dGe0hal0s/OnvblYuyouSV0rE=; b=NLD5AWOqA2fYFGUJRANm7VGM6t6udwiSODGxzB2htu1usmy9RJXFUSzCexGkmZEeUw MF0Jb4a8+z5vN3wx7Q6Qgad2H+5r6C67h/Sh6reI0RdrLsV4m/SCUiX94eBvPn9Qbryg ZZjGhE+4XpDdaLFjQ8sNY+MirgYELzXxO1xemO8X1qqVsyoteZGG9H43sJHdrQy03/Fw ixZlRD3W04pJGUB0ZMyEQzicE4jXKG7U9W64symQ9J4nyo/2bzpnNsvSJ7QM8GHyV/EW bWg/4udQ/c3HVE+XrPLlQKklh00wVNVKECDJtiUZnEoSuumaUL3Un2Isy2po2BvxIwub ItgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1calvlvF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si7271797pgl.479.2019.03.13.12.34.40; Wed, 13 Mar 2019 12:34:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1calvlvF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbfCMTK6 (ORCPT + 99 others); Wed, 13 Mar 2019 15:10:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:41510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfCMTK4 (ORCPT ); Wed, 13 Mar 2019 15:10:56 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E56D2173C; Wed, 13 Mar 2019 19:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552504255; bh=y9y47JSV/ag+dJrCqBi8OaJ0Q+x9eFekQZc46E5yHR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1calvlvFwOLkEwXP3wDoUysUa8q1vp4zI9hM0jBx76rbHlyGq53f3bLwRnNQxFA0k 771PzXRLXe1GcJNU4HuowRreXeqc43tnKZyTk0K1JmDWLIVacWI7Lt96ETmVA80xag S28KDbgjygMTN3o8Cjdmt2+KZD6lUE8egvIY0rzs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Florian Fainelli , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 15/60] net: systemport: Fix reception of BPDUs Date: Wed, 13 Mar 2019 15:09:36 -0400 Message-Id: <20190313191021.158171-15-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190313191021.158171-1-sashal@kernel.org> References: <20190313191021.158171-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli [ Upstream commit a40061ea2e39494104602b3048751341bda374a1 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 baa109040b40..f389bfe41eff 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.19.1