Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1306141lqs; Sat, 15 Jun 2024 03:31:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxOhbAZg+qG2GtYdueZQU7180j8wRCHkVnS/uTJz5AVPNagjijLxY9lMgQVgMtTIIERatvJptReyjNHB8FtwNMv/Y+Z6PbnvQiyM7JWA== X-Google-Smtp-Source: AGHT+IH/amnYeJcPCDnQMfiveNszRhMHhxPijmtxxoZXCO19SOtK+I3vhYX6EhwvRS1b65/luKyO X-Received: by 2002:a05:6a20:748e:b0:1af:9ec6:afbd with SMTP id adf61e73a8af0-1bae7e3cbd6mr5511146637.11.1718447497189; Sat, 15 Jun 2024 03:31:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718447497; cv=pass; d=google.com; s=arc-20160816; b=gpZ0nzW1/EK+eIiVCjrLYP5wNRaJY6Akad6lpaZU5WrQgSkhkMtbQM1QpXm5/BxaY4 iqgejVLsP9qWCh1cmrdyjax0iEILLfnyOuXgwJ8dLBn8dorRAzq3FpYe8SofHyrfxmHO oY4RmX6vBJtwGMIi7MjOJaZNWm1GpVQVzONfW208CEczV/Ra8Z6CLUOPXEuOPLVFbM5l hZhsWcNe43pwdhyaKgboXaqwPQfLu4Pdwy3tDnhfqfyC4kB1n28byk1UHC1fdWTglWMO 14FHWuDBIQ6yZJzzjtK7rxc6ssHJolATu2oVtPL40XGlN3+fUvOFs3wElWrieX0Swo0O ZWPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=3zHJa43oiKnEyA22nIy4MuNC/GGeP24LUnngCNOVayQ=; fh=Z1JVr0YDlIkHaULJ+vmIfkkerT98nOlutccotBqgt7g=; b=fIIG98jgavFQtSl/ZMx65GHNPYxb5v6AMjWuTvEpUKFKCDInjq7sX4KoYbojC7JY7W jTjkq+pNLdcE0Md8RP+vLGjO+pxyamNho5LGboHCwZ8ACoiJeXi6VSm+pxCCK3O6DMCZ Wza8uSOO5Dyny1P4GBYGsJzEOKE0PeABrK4Xx9nFGHVoH5d9Y7sJCFhsOsDZm7xoHAeH vvdQoRFkccuMW0cCi/kLCzngl69N1Y1DQI9lzLGJjfSmUt6nvKb0hujFD3BX1qKxtP3M zG/LjO2PEICpxMGiywke+qNxik7rpw1dhRPAUt6dYbraNB7WkX/Z8h8+5c6BdemYY+QL /psA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-215831-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855eff5easi54217085ad.494.2024.06.15.03.31.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 03:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215831-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-215831-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C57DB21F50 for ; Sat, 15 Jun 2024 10:31:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E94903F9FC; Sat, 15 Jun 2024 10:31:01 +0000 (UTC) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99CAD3D96A; Sat, 15 Jun 2024 10:30:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718447461; cv=none; b=nfIgNhOVqrW3X94W6IhlieNel9d/vuMn8RGpmgqvVYp4B+pevPdq4K6gQlKTvniGovBPhsrSZSYz3Lm0MwFqgaTuz6srcYbGn4zRQAzmMPfB8h6H2YNSTRitfQ1pWmCBKC/ERvkr4yM+7VKoKNxW4gS0C/tx4zhg9szl9Qwta4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718447461; c=relaxed/simple; bh=x6C+cXK3P0uYDqptIsdiBzfv9QOKfE0ygykqXJOCFW4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qtGdN6cR6nalXOEhnfODNfEX0MgMIu5Hqmc2ygBknVUNP01vMz/LSfPOOlwKrm5WhBIwtKXlWKQUzImDX2xV2pyO7IgtgUUiuDeE98kuo4pe5mZ+BJYspyH/kUOo8fJgRp4Dg5hPoYa5y6L4TdW4lM4aZum/FXA2W4NEEVBixH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,240,1712588400"; d="scan'208";a="208029890" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 15 Jun 2024 19:30:59 +0900 Received: from renesas-deb12.mshome.net (unknown [10.226.92.58]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 95FB340071E2; Sat, 15 Jun 2024 19:30:54 +0900 (JST) From: Paul Barker To: Sergey Shtylyov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Cc: Paul Barker , Biju Das , Claudiu Beznea , Lad Prabhakar , Mitsuhiro Kimura , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH 2/2] net: ravb: Fix R-Car RX frame size limit Date: Sat, 15 Jun 2024 11:30:38 +0100 Message-Id: <20240615103038.973-3-paul.barker.ct@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240615103038.973-1-paul.barker.ct@bp.renesas.com> References: <20240615103038.973-1-paul.barker.ct@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The RX frame size limit should not be based on the current MTU setting. Instead it should be based on the hardware capabilities. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Paul Barker --- drivers/net/ethernet/renesas/ravb_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 02cbf850bd85..481c854cb305 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -555,8 +555,10 @@ static void ravb_emac_init_gbeth(struct net_device *ndev) static void ravb_emac_init_rcar(struct net_device *ndev) { + struct ravb_private *priv = netdev_priv(ndev); + /* Receive frame limit set register */ - ravb_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN, RFLR); + ravb_write(ndev, priv->info->rx_max_frame_size + ETH_FCS_LEN, RFLR); /* EMAC Mode: PAUSE prohibition; Duplex; RX Checksum; TX; RX */ ravb_write(ndev, ECMR_ZPF | ECMR_DM | -- 2.39.2