Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp260495ybg; Tue, 28 Jul 2020 05:29:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMYtiidt6nG2weUyJ6bswt7crB5fxkrhrW9hviQ4EnRfoaWs2h6+RB65PR0TGQTkMddR9a X-Received: by 2002:a17:906:c34e:: with SMTP id ci14mr12362147ejb.335.1595939390117; Tue, 28 Jul 2020 05:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595939390; cv=none; d=google.com; s=arc-20160816; b=cG9+Mvj8kjxIV+iIAVK1nxcDyY3HcnDQtW1MyOH/K9GezmIvsA1UZbJSqnuvs7S4m5 pHw70R5EiaztQQP8tDDJWPmGEUPYz7V7XhSoCbfG1a0zD4CnJXCeLtig9VzsOuxQtHUl 9bdkVeAMWUc//asSduwWyYc8NKwQa3kYJFXtJwxYFYf7kABSQKc+hvmel2n5GkW0pG8S tvpUOm0NEWVVY2nxFXDqqIr/TAn39T914YJMoNWXX6P8Sx7GQLi5+0akSUgY5gLc9VUk 8FNoqK12wBrceOZi6ihV9DH/4TvEebgOXdOYBfnLtK6IURQtbuOQKVhMZPvcqDzNIgh0 4RPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cBZ/bILTGURooh2/l8xNDLfq8b71aashM/aCdpv45hY=; b=OZpH4Z07E7c4iy79YGgMz3o0CA5idDhtSY7t0dWardtKDujY217/EXEKn1Mc/M4+6X Ada1vVsfp7yrVSeJCW4SAwZjTHdNtkaZzs1ALePmacY/bQOf7migM3F9fiOTn1YUXcqC t9HiVa9o6wKhtAMbLR5IA4rneG4ME0TF38Ahwmjza4+QlZPE0E7GWlDlWrPSSNUvdmk5 /EFpeWV0ScAYmROPdDbbrU+CB5yY1vtPdgssZa90RoAcmmKQGjB1XEHbdEw6HC0b2CHI TN8qhbpueLiCaIsFPC0xZs4eo+v8/FVlphI5itlZYfOvqSV5D7v7qNx4LKE1tkpVu7UV exZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=KFWninAw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si3841367eji.301.2020.07.28.05.29.27; Tue, 28 Jul 2020 05:29:50 -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=@gmx.net header.s=badeba3b8450 header.b=KFWninAw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729572AbgG1M2u (ORCPT + 99 others); Tue, 28 Jul 2020 08:28:50 -0400 Received: from mout.gmx.net ([212.227.15.19]:33613 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728300AbgG1M2u (ORCPT ); Tue, 28 Jul 2020 08:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595939299; bh=+Xhr2x2VYD1gWTmsb4Uofj+UiBxI7DdvuosyZzVaUM4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=KFWninAwHludxMxZQsuEzqYoXKBYCcGUd+YU82B6QxqADTgG0ZzR3Izd3f5yyROqS DVFscsUdxRXyCcMEnEZhgBs7sekWgeez0btr08FVEVoy9kh3bWZ8Zfqq5HMWWlhX/I 9c5R1xKiSUgUrjjDyRr5JtBcQZcodpHMELOchWJo= 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 Cc: Landen Chao , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= , Frank Wunderlich 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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:6AZmNkrR0vY=:/2GNiK7U0djtOSALtwVhUo E4o95iSJIypzT+gKBd6jBwrAaoQaz4NPh+ydoyiRA5XRYp73aNToQ4CTIdCOAZFHPZ84jqiLy NJ4uY4TYfoXNU0uze2bhR8446EZ7sX3Mm0hn2MJHSFjS8xKNigGXiB63k8nIOFuT4F3jYtqLt kCA02I3FIT0j5RFMn+XCTY9PffplsrQT8yCM5xLQRJUxoo2a5rZIvzYenDz9tjUqejaJSYC8K 5LMpCpZmYBsUR8Q0GhE/FM8/UFg+RqGQLWzmrtDBXFpdd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: X-Mailing-List: linux-kernel@vger.kernel.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 o= verhead 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=C3=A9 van Dorst Signed-off-by: Frank Wunderlich =2D-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/eth= ernet/mediatek/mtk_eth_soc.c index 85735d32ecb0..a1c45b39a230 100644 =2D-- 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 d= evice_node *np) eth->netdev[id]->irq =3D eth->irq[0]; eth->netdev[id]->dev.of_node =3D np; + eth->netdev[id]->max_mtu =3D MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN; + return 0; free_netdev: =2D- 2.25.1