Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1720140pxb; Thu, 16 Sep 2021 13:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr+IhZ9avZxKDWjlXjBTkgjXBgsOnrc4HqNoecq3arQyxdby8RPNQ4rsmqVrf3BXnuwG0p X-Received: by 2002:aa7:db56:: with SMTP id n22mr8928244edt.148.1631825776623; Thu, 16 Sep 2021 13:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631825776; cv=none; d=google.com; s=arc-20160816; b=Q2fxGFx72qYxlXYEl4ibGNITmbhG4DGTW4Xt52JZV6KDaY04ln+7v6JmUeHhN47zFZ rWA4Rdodl0soLyrwaczQ1GY5zFfUM60EaTI3Jwylzfln/iW8w3tpBrY/KmKzH8INd5ro imDQNsRFjci5Wi0Sxkz1EqulfS/5mXCtkY9La7P8pMWNKLkjeRY2pF44owdlbvZp/zMg w1LAl9uNyH77Lt+0zxOyELH66x9rY0bukBVfdDlzEbFfpTJw2rqcT5IKeWzKpnQLYBXD yh1bvBP7MH4tZQhJwjfu41bVy8l7zeRvmZq3SK594UNZBTgXw40ZmvwtNxcsoxCm9jLL KR9Q== 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=v1ysCCE+3Ovm75NbxZhEq+XeZ6sbtJ/la/Mm+41VJgY=; b=bv1wc+CpSDMoQa3qVcX6RALUW4YRP/c29nLan62sg1fz9HzkIkywfnsTbCApRCmoBv r7bnuhNS5CSJJLgiuFZMuu3HSEHXKtiv1Rr1YKItDH7fVbh+2qEP6rdnHHJnBPsbasbN fTgPqEma1qb2XIYIOPXNfr6EWStS7i7qIWQ14j8+2aZIPkTc8lWq3DMZYcCkS6y4hTno G0YAAaPLNhtsoC2e09KZvxj0tszQAsA8ib85yLwFLAhlqk36DUUxcYYZxdZY4EF8oUyh szI2e2feNQptJyE2FjgfXQaB/WW3S5KhmXl9vQ3wRhDw6EBwCUrP6U/u7nxO2aAhGHLu xT1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2Pxon7Er; 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 i13si4615397edq.512.2021.09.16.13.55.52; Thu, 16 Sep 2021 13:56:16 -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=2Pxon7Er; 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 S242707AbhIPQdB (ORCPT + 99 others); Thu, 16 Sep 2021 12:33:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:60152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242110AbhIPQY1 (ORCPT ); Thu, 16 Sep 2021 12:24:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 578A060F6C; Thu, 16 Sep 2021 16:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808982; bh=cjum1AsNWmvOrgUcR50d+tYsMXSVOPMkAp0BYQhLitU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2Pxon7Erj8TZYPJIqc3fE0REGfLOPcAocQn2GNPnXGpZum/yCw1Yr3Zw24MevQAng QKbideaEGV5i69OoqFxjm7EKK84pADmcEvtlIX2XDE9NcOfBiFNg68R2+nEq3OPUAv Q+NvVBBSZZKQtp/jTxY1ro6FWMTf9H8dIdNbYDbQ= 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.10 295/306] net: dsa: lantiq_gswip: fix maximum frame length Date: Thu, 16 Sep 2021 18:00:40 +0200 Message-Id: <20210916155804.152506037@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 @@ -853,7 +853,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);