Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2370643pxb; Mon, 20 Sep 2021 20:26:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT0UUynvfDDynKVSmTWLOSN9Vubs/5u7UuAXtQLQ6GTOgKZMwJyloOWJhzBbJmHdbNWZSa X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr32713031edd.13.1632194798084; Mon, 20 Sep 2021 20:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632194798; cv=none; d=google.com; s=arc-20160816; b=eg7C1jVX0mM1PlzqZPE1rC+jN8jycTW0/JNQFCKKnzaYS+4AL1LpmPWy5ABdkk0bB7 99H1whvhdX5ZOmPRKJ8XVqpgr9tjl7AvxzH+VX26FEiHYGO3lN4GqEI2PrY9bgqDnPps ZPr+aZSpafTAqDq5+DNs6ZOvGO+zP66VvxqQ+Awutl+HkEpT6qHaC9DmmvVwgxJHH3wk leoK7oKcW40XPtvc4kSLy9Aojul60wZLHmzhbVeZuFZqPVKkgIdY1ZGApVcpaOczP5gL uoqWFM9geAnuCFdeGkv8ooswk/F+ZHC9C/GuC7UsCbvhzl+3fdO9AmLmBzxeN7VWO3lR a8BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A4aa1e4AWmhJG9h2S46FjNvEXx1XmxbcxsjL4nc6Cqs=; b=yCnwn6qnAg5M0m+Ou8ZBTpSjfAiiakEFfsktLVSOUymYX7vy0pOTxHtOtn+P4+vKzx xoNU0LSTW71n2koZr/SrXT/FrFBgWE0VYW7PfF0xOAotusIk1dxTD4FGktQW9B8+Tlq+ stuuffWvrCo9bDI8CE1v5YeVtcy7c83ta6UxP9BszZVQXbvtA64DCzhMO67rXhHrHZvn F+gz6g5avCP9bBlPdLBLuLGBe2WVqGbtal8ajfXB8TNODPUOLFhNPTVwuHZ6kB4rORzP kM+XB/L3pzkIQ/zzxdmHFarA0+UW1XD2f1rsSLZHUHm/OAEZE9totQgJYIF9Emo8hlwW izFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h6FtobcB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy11si19144834ejc.732.2021.09.20.20.26.13; Mon, 20 Sep 2021 20:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h6FtobcB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378806AbhITS0c (ORCPT + 99 others); Mon, 20 Sep 2021 14:26:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:39460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377557AbhITSTZ (ORCPT ); Mon, 20 Sep 2021 14:19:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD1CA632A8; Mon, 20 Sep 2021 17:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158595; bh=lF6oAN11FTL3bQTlcKTnu2iHEVkJMYmq5IYSVyCDbCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h6FtobcB7JvIo5uiadf7OOYEanUlEFIIDHvQm3byPMKlWuX9a0lQvqbnjiHca8ImW BKj0ap+AapQWy+yikvX2VVWdhpH6asQf02s2Gmnt/9lS0G0xtBsi5fzibzAwIjb0rp qU7HuLS5gPN3ogS+MhUUi/I020jsewe0l716B+0k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Hoffmann , Hauke Mehrtens , "David S. Miller" Subject: [PATCH 5.4 186/260] net: dsa: lantiq_gswip: fix maximum frame length Date: Mon, 20 Sep 2021 18:43:24 +0200 Message-Id: <20210920163937.430977332@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Hoffmann commit 552799f8b3b0074d2617f53a63a088f9514a66e3 upstream. Currently, outgoing packets larger than 1496 bytes are dropped when tagged VLAN is used on a switch port. Add the frame check sequence length to the value of the register GSWIP_MAC_FLEN to fix this. This matches the lantiq_ppa vendor driver, which uses a value consisting of 1518 bytes for the MAC frame, plus the lengths of special tag and VLAN tags. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Cc: stable@vger.kernel.org Signed-off-by: Jan Hoffmann Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/lantiq_gswip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -837,7 +837,8 @@ static int gswip_setup(struct dsa_switch gswip_switch_mask(priv, 0, GSWIP_MAC_CTRL_2_MLEN, GSWIP_MAC_CTRL_2p(cpu_port)); - gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8, GSWIP_MAC_FLEN); + gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8 + ETH_FCS_LEN, + GSWIP_MAC_FLEN); gswip_switch_mask(priv, 0, GSWIP_BM_QUEUE_GCTRL_GL_MOD, GSWIP_BM_QUEUE_GCTRL);