From patchwork Thu Jul 9 05:57:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11653381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 089F3618 for ; Thu, 9 Jul 2020 06:07:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCDAB206A1 for ; Thu, 9 Jul 2020 06:07:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BOTrTuS7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="QzGYEHo/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCDAB206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=A2/YUEUWpDLz2sWgkwZ000538yC+kG0XQJVCOlD5UVA=; b=BOTrTuS76E6oJ+mMnKqFyzcrcN R0ic3F/imwY8Vplor2avoFm84dsYC5gIwLBaHbpanG99pSIAbNpaxPdtkBQE2h7Shaj8pzTdPMoKR 4AqMvLKJzzCK5sERNejFzb9UOma4XOKzFQPLsn9e6yRzeIQ1RY73Dr84lg3fYWTybrIASfb1rZl+9 7VcSyj70rB8taAKSUgoSU17Ywg/C9lpti/Y6e8T5D3VzWDAbtSNvTP4GvndbalM/6FhZMIZuhWCPy PA8fWeer4bT2N+ZikfApNSYORtQvwuRzA6moBYj/r/KOdm4UWcMs7XtjnrOsIWd29D7ofyk/2/xG5 qkO0p9LA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPfG-0004Mq-Eq; Thu, 09 Jul 2020 06:04:10 +0000 Received: from mout.gmx.net ([212.227.15.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtPfC-0004MA-TZ; Thu, 09 Jul 2020 06:04:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594274638; bh=TZyOZH4895BbG19FeNnP5yjeMPwsXxV4vbelAvplHBw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=QzGYEHo/ptT18IdVlPW4bGbhNJ3dogQIgcIGYjAG4dOyZocKQ4e3askfNPV3wKbdr /6XN9Oq14ugCxk6UFZB+3GM6ivgm62kBtMMgUKEZh+fAArFA6M8JxsrpbQ3PgtEcjE g+ujCmNJuGmfxlnraKO1C8GwTMiyPNRcUae1E9Q4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.213.58]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MF3He-1k8ldY2LKS-00FSxk; Thu, 09 Jul 2020 07:58:00 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning Date: Thu, 9 Jul 2020 07:57:42 +0200 Message-Id: <20200709055742.3425-1-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:Wiq1d0Rddq7HCel86HaixNIkmlj/ib233BDnqRUt+y8BT1RO3P0 KCVI1KoqMaaeH+Jnk7aRF5LN5LWIrxCy5SoM6qHoojl1Y9q7hd4SEuQ9BsurAKmIh4IZ1zs UNKnFIkIvAaj38rFsVzNuw6Fm0S41lXvLr4TsfQFYfaz3gLFwQlhW+8EJwv0sZcbieLvfNY Hsx+dBl35UMvQTDEG5WYg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wjD0Wrsji3Q=:1xI3LueD7hF5Tgdg+a9IKw Zohe0u++npHBMdPKovKMO7c1ju6ClrJs2C6EoKu/5NoWbHijS9AUhGRVX4tVUimchBPsE2R0N c2m/C953zBhkAuErvsiiWyl0RbgjPJPo+JLAZS22NPavk+vswmUq2NBIG98Xd8tNMZqvlLg5/ gey479R8Jh5CwpdLSnjGvWH3WNL1jEfujQlJexk/MipwoG5Qg2A0+N2kNk7pdpnhwwQVHVxRj OE5HQX/DrYT0/OM5q9OVjR8e0za2+f/Kvrzf/IXFEHPlaBGeI9hk3PNPzKoWdM5e7rvl+VLOQ rp6HR8Bzhdsa9Y+70wtlkyzExTyy+c84etf5LYQbfs2HerybFMS/LQJhwcKEYn7Xwg3t5S0gi sWSvDK6/0mnrQU4zBAvojM34NRorO2duL0cMB9BxZzv2DyFUCUDbEkbI9wwQ1IhwzFD0geSTs 9wP+6OGdYQAof2yRTkViFb/LA5sBZf7siuaQ+xjQZG/l5YLnWkQBCbdGHuB18hwC5GLnHxeIQ ZmwZrH3NY2pmyeR8aDs1riX/4yAsOoxHBQ8P8pEXmWRc9EXMBaQ+c3GThKCsjCbJZZY/+hv5u C4bgIKVsrAVpUr6VKSG3kLCp5FMY/mU5bBOBd/LZ0AfUlJahtbTEpA9yAAYHKfZSPvGzCzVQW jsDxUnRRoprle1uagKB6rPqZLD6ZYT29qeVU6Vs5j6Vf+Xi8Y4o8NB9pMi+6amezZg/MoKdtx O/glfLbcfbMGLQI05vi9MdNi3UpwlndNE6q3RSgsPqZ8+7AWi141EBfDttqbSBPxwXE1MBDSh e0FwQKAB0BCJFhT523tYK1w8eZcmCrlsB5TU/WMRMpLJq2OPoESmjqulnvjOrtx5Gsy0BgW3/ ZraawfGfiI+k95WRF5YK/+ib+0PZU5AaV96So393xJ9mk4z32bQ1rw7WjX2/KtZ3jiErtSdh9 Fwu15LtNaZwT/aEVpsNxRplHJFJH5whU/0LNyAeQr9sN04nJqKVcCDEQeAfc0Mgdw7udFe+Ve 1voaZ9kqncogarjCO4m04af74pAhSZQvU/e7LrEjDg1hC3xCnqWDJbv48XeSJ1VW7GA0hEfv/ uCSnfFPHPNzvPBlZ/j781etTeSwwz8xbzF06y5U0dKm4YHf+/Lin1PsG9PV2x3xNIsEfGZ3hG KYfyqil5TAAOMRvoBz0QHYBPwLPlOLwYo5D/mnqb97gk/65LO02Nq7uNz2N3N+rl33z7hfOUG X6ezcp38m9FgQppTOhUoSirqSO2zcfRcL49Wdog== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_020407_155582_1C07A31B X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.18 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.18 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich , netdev@vger.kernel.org, Sean Wang , linux-kernel@vger.kernel.org, Mark Lee , =?utf-8?q?Ren=C3=A9_van_Dorst?= , John Crispin , Matthias Brugger , Jakub Kicinski , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Felix Fietkau Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: René van Dorst in recent Kernel-Versions there are warnings about incorrect MTU-Size like these: mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port x eth0: mtu greater than device maximum mtk_soc_eth 1b100000.ethernet eth0: error -22 setting MTU to include DSA overhead Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Fixes: 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack") Signed-off-by: René van Dorst Signed-off-by: Frank Wunderlich --- changes in v2: Fixes: tag show 12-chars of sha1 and moved above other tags --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.25.1 diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 85735d32ecb0..00e3d70f7d07 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2891,6 +2891,10 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) eth->netdev[id]->irq = eth->irq[0]; eth->netdev[id]->dev.of_node = np; + eth->netdev[id]->mtu = 1536; + eth->netdev[id]->min_mtu = ETH_MIN_MTU; + eth->netdev[id]->max_mtu = 1536; + return 0; free_netdev: