From patchwork Tue Jul 28 12:27:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11689083 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 8722213B6 for ; Tue, 28 Jul 2020 12:34:26 +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 5EF712070B for ; Tue, 28 Jul 2020 12:34:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IJRzTMhg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="HeBTeN8J"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="XQV5K0dV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EF712070B 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-mediatek-bounces+patchwork-linux-mediatek=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=wZtFb08SiH9S8NkgQcLnjDqinmAy4AKAIJdt858k/Ec=; b=IJRzTMhg50kiMuBO4oqQpuIzWR H/4GitNLQfgRnJ8JG1Ab5pBUAgQZ4+raWsb5xV5CkamKDN8Ff4b26M2I+59SLedO1MN0E06krxOYj oZ9W5dPhJda8Nuu+ddmU4chuYG9/8G98m9FFguWDPUkqltGgadr79aPhCNvsJmfc9kJklGaFhUGqi bU4TaLkchZcWmyDHjaO8Ha/TgfsQKQLHDGKmaCA/BGhf68mYM64P1yKUVnVtjDuLPtWMJS5pLFwH4 ibjM2JvMVgWo8/3Xg4e05WKN0lN+LH4r7jsYQiNc1sc5gP2Qv8EOOtuWySfuRt+wBdSzUNZC7G4SX T5H5xO3w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0OoK-0003Nd-7q; Tue, 28 Jul 2020 12:34:24 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0OoJ-0003Mq-5y; Tue, 28 Jul 2020 12:34:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=cBZ/bILTGURooh2/l8xNDLfq8b71aashM/aCdpv45hY=; b=HeBTeN8JZToVmAiDW8sZHTJ44c dOngnPxtXUjh5A4tz5YC1+FyN1MOb/ZQLirxoyjmM99QcGf67N6eB5r1f2sL2Ky8W893exu3Jt8kt /vfX58MkglNAOgzJL2tGKjV7pWtDV4lEMj8wkKgdZX6XJ04ZuHrdPOYaiPvIvF20+kkY4IHRIfYYw aRDG2yOqfdPk7m2qEc1jSipNx4em2rmEA1ptVMw+xcP0g37CD/CsmoVKPGnkQyHL28kmJTZM7ehet UyWbc5vasy9iZX1zjkSyigVWIUY54ZVWTY+y+4B1EL/dPtDpL6y9cNfVScxSaoVsB4pE70OcQzmbB mtJ5euXg==; Received: from mout.gmx.net ([212.227.15.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0OoF-0002KM-B9; Tue, 28 Jul 2020 12:34:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595939646; bh=+Xhr2x2VYD1gWTmsb4Uofj+UiBxI7DdvuosyZzVaUM4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=XQV5K0dVM2zwQ0itCwzNqrNrIO/Ko1wE7Yymlnc5KjXU68AMT83wl6HzqbZP/1Pyu tQ+KgfD8CE9U1GMBHpnzDXT00OcT9m82GbDeK/z2RIvwo5NchMPn9nDADLXaFGJNXH MU7ZVpZ6Kkl02XEZ09j9TjmjoCFmPPNysH+MNz8M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmlXA-1kScia3yWE-00jsa8; Tue, 28 Jul 2020 14:28:19 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v3] net: ethernet: mtk_eth_soc: fix mtu warning Date: Tue, 28 Jul 2020 14:27:43 +0200 Message-Id: <20200728122743.78489-1-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:sc5b1pOFKi3FLEOULKn4OozLSQed687rhOjKqf+XCSsSamY2PgS 2JzFzyIi+ztuNLr94TkKDcwv0V8CQVVgeRKACmKp1sOgDjY8lWDHTRhJEMdJ/ZdmLtdPzEY cpxqGiswcGavM06bTX+Y0XB7iBhQhFTK5u1HoAKmuv4zSkW3djqLkiVs66c7HgTDaGRA8G4 K7il9Y7OEKrorNMSU9CNw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:pyvFYCDbX9g=:HE5yGDJZqbk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037oWYF+yoeDSijAXE4 5dHE24PdlT5uElHcqdfhZ15iG/FIeSDi4wMJ0iMbp16k3jjCRMKoPGu5+CUEFI6fmy7BaGmFd 0CbFDiNe7va9c7zPTew7ulvdILToxBt68fqskXtSgoyAnNQpF/Ydo+nV8rHRw3xmivDOShJ2U xV1Fwj6bEFHo6mQgIhRG8lasxjLn7mGgIVMPq3Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_133419_960838_40E54265 X-CRM114-Status: UNSURE ( 8.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.15 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Landen Chao , 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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Landen Chao in recent Kernel-Versions there are warnings about incorrect MTU-Size like these: 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 Reviewed-by: Andrew Lunn Signed-off-by: Landen Chao --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 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..a1c45b39a230 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2891,6 +2891,8 @@ 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]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN; + return 0; free_netdev: