From patchwork Wed Jul 8 15:46:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11651881 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 CAFD713B4 for ; Wed, 8 Jul 2020 15:58:06 +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 A276A206F6 for ; Wed, 8 Jul 2020 15:58:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FqgEyZXK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="LKNggCJk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Ps0evOh+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A276A206F6 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=cwSWBXp6gCRSws8wT7tGnOsguFBPkT7fFoqJXyJKv8Q=; b=FqgEyZXKyhdFlLoBV9w/QsLcHO rQcBMD9OpEKiQtTdZpCXJF081FInAxTtOu5SIuKsTgle4omY79lpYZr54PytN7FXw8ieWAsdsXcH9 kfrjzny2SB0ITeN925aCus8RNfwOjeIS51xsD9W1WQqalYGBeXOvjOSLdRuVtYm/H2NB7VNq6IEoT aGBvurjumUzzi7Irk99hHWrBXv1V+Qx+pod5qSrtDZHOK7JO0z/1unSH3Z9SEkUIGnsWVTe5l02jX qxhJ1dOqjRUJMa63NT4CMK1srWsjn62j5jPyQeRzjCHCUG7u1Sw/MXYSdLaqDkIEte8Ul+AXl2TxH dwmndi2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtCQd-0003iE-9U; Wed, 08 Jul 2020 15:56:11 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtCQb-0003ho-NS; Wed, 08 Jul 2020 15:56:09 +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=mKHv/or799BB7Al1f1LxDwGNKUkeVNiB9yl7fOjGcLQ=; b=LKNggCJkzj8Af7oC68y2VNgze8 3K5Is266PJ+Fg/QW5irfGAE8dtmRrBerLeJBtZGFR+oVAQXlvmsYbhORSZFTGYUHyylcP4nnwa7Ee 6Ey5vOmDB3NP3kcHQc6AYfvL+yArIZN31HpxYY0e6coSLRH4gc77Py4rpj3+CgUiVP4mqh7V87YW3 Xl62aByYnT6XKMZGGsDksaWw9WuCkRgr9d7TXhEfWNI1ffw2k+6tvT2o0qq1BTgA+5UfO261+N3/9 UVf36NFCnBfVJTeQhlPRSz2PIzmt5m3ima4cpljE89LMx4j5gnEkqPSf9cxe42oJ4tsmiD0y/Nb7M R3WSeMMg==; Received: from mout.gmx.net ([212.227.17.21]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtCNz-0003Yv-HG; Wed, 08 Jul 2020 15:55:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594223565; bh=LU0N738Cta16L6YXG8KR0rGDYWQO7GyOF1FHDDiJg24=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Ps0evOh+3vgWWrtKWtW+WklwvqjznvnOFsMYekWW+LevoqDtUzMhiiVELzNE3AQaX h9YnBwKrpZqq2t+BhB5JMeOF8vI5Q1DiPPGPFOzLe0jYW9Cj0bq4bG93YlVHHte3CI 7heVsggp8/Rm7LoN8wwvfFxqUy38UoXEU+GDi5Js= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.213.58]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MyKDU-1kpIgO2BeG-00yiQp; Wed, 08 Jul 2020 17:46:48 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH] net: ethernet: mtk_eth_soc: fix mtu warning Date: Wed, 8 Jul 2020 17:46:34 +0200 Message-Id: <20200708154634.9565-1-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:f4eGLoM7b59LlVnF7QAav5q/YJIcx9clM2yM7+NqTv9tBkejQqs au1gdA7QoPd0PPprJTzRKzybOTMmD14heF0qGnjwaABpo+XISVHKv5rw99O2S0ojFe9uDQL Qxu2lOqi+kzvKyOBpfLYcfelq6iI7x0aHD2bo1rK4OYlfxeRe2f4NPCAwZXbWjcYfAUryJJ xAsnWzoMdvXQ0LmII42Zg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZmyyK6eqHY8=:csok2Xzh8ggD5aZNZ73UfB DkkOZyg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/Z0I2V04U41BJyz8G7pG1Iz3NZ IpcN289V5nmvnx/YMikwwa+bKf5TjDja4yVYOfOEtn+ZjcAnktmIOlpVK4aUmZsb//SBk23Go LA/nvKAC7yIi/AvanJUoUIzF9ODfsb214cYsLqbqqDbjl5m63o42RC+0ez4d4eiDXPITPLP9O U1ylozikemylFp0wXQ2WAFclgxOXapiETt4O54FHaPFaQwkQxBqd4+MqxC49AGQWoto0p4FVe jaIIEXPt+pzMyEq34QSUGRMqHNifIxph9dw3jMLAKK/dfmKL4c5HJhfC68QUOF2qmGG4X+7H+ kfJM8c+FcUteWVq4rNhdRwA/xDHW7+NaSWwL7CY+ZUGkUEhvY8Co8YAe1qca23OahjZvI2GZL meOFVzGh6RR4huFDtNzrQS2jO1NV3ztDMpmqJ9N8jgXYvIEC0LyzuL X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200708_165330_711586_AFBDFD2C X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Note: SpamAssassin invocation failed 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 Signed-off-by: René van Dorst Signed-off-by: Frank Wunderlich Fixes: bfcb813203 ("net: dsa: configure the MTU for switch ports") Fixes: 72579e14a1 ("net: dsa: don't fail to probe if we couldn't set the MTU") Fixes: 7a4c53bee3 ("net: report invalid mtu value via netlink extack") --- 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: