Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1570812pxb; Thu, 16 Sep 2021 10:07:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUlUREMrxR/Dqyz1rR93/sF7y0QmO5GuUoCHr5UElIKC6v0vGaPdvKsOwEXmlupUXxIVGd X-Received: by 2002:a50:d6cd:: with SMTP id l13mr7398052edj.360.1631812060132; Thu, 16 Sep 2021 10:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631812060; cv=none; d=google.com; s=arc-20160816; b=QxC4x8fXQXeEXmA6hekDcWCsXoTve9Iw+1cONlH9WTm/Ow/0W0UHoH3c9OAfcV0v3i wniMvYOP96qNJzRLsI5lAZLpmkY7tcXHKcwEqDh66yTO/+9sebXxbKBLL5mgCZXzh6Y0 ABdqKoaqLXlbQqPATo/zmBosbVDUokbRzTKqeIyMbmiviPeyizvTeaVCp1qUZJUD2op5 eu33OBGu8SdOqIVsF7+QzTtin5flLt9+VugoMHh5M+5IKWMMgP92/33QBv4tQMu7GS4o lhXDdvQ2WKpl6/De7V/jNashwmfNzmqS0XGj1Msz8qXLELd5d6+iGXIR5gTCE9iP0y+6 2ngQ== 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=uyD6/ymvVZxuh8KCBgWpUS1kFsxJunfrZ1Upe1sZ8B0=; b=aLr7+m8S+21l09dmDeudWBz93SG9ooPneu+iLYAuh5bAXHfVqW1cOtCUh803Q/fg4M IMk5xmi5Yb44Zn8wusgOh4RMyNb25Ahrir85FqOigzQm+od10wMS/yL4CeCXxvvbFKgD ik+m6nNBmVNdSmB4Jf6pur0dhHEdFMZ4F7dgOE/4AeSuKH9QxhvTF0qGHWQyICque+f9 9i4MywtkMTyZiTl4QfpIlesP5XtbpccOASFFxDeM3oMD4RxZQo4W8p/fa74GCD1JiTur H+b2XBnuZfbi6KoSW6uYV60GiFpkIMD1uWhrgmX2kg7wTUGPVDoZkhdwLTOtDej0S+Un D1ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YKXlzVGO; 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 y14si4366691edo.391.2021.09.16.10.07.13; Thu, 16 Sep 2021 10:07:40 -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=YKXlzVGO; 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 S1346808AbhIPRFT (ORCPT + 99 others); Thu, 16 Sep 2021 13:05:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:34162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348209AbhIPRCQ (ORCPT ); Thu, 16 Sep 2021 13:02:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A35566138B; Thu, 16 Sep 2021 16:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810011; bh=+1Vd0T/Ze1tc5ocUpUH2SanRKBwKVYm5QNd51dQgMJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YKXlzVGO/X2c7E4h44MvRKousDQ4uAzTiUxE/xiVCyJ81lljRyv+5VutzZXooi0ue wpFxt2/i1XYpMB5AwJYKg0luI/6VjTGLHOHMrS3YrJoK3P3etCuK9k/5m9b1i62Ifx UHJ66aGX86cOdwNQ6q4ZBuVQEg1Z3f7YBTej+b58= 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.13 366/380] net: dsa: lantiq_gswip: fix maximum frame length Date: Thu, 16 Sep 2021 18:02:03 +0200 Message-Id: <20210916155816.501222721@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 @@ -843,7 +843,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);