Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp477102pxa; Tue, 4 Aug 2020 09:59:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmhKdOO0mn4JtkhPZ51uOIJHx6XgngZfJut1JVwPpBnkjmPX713GoJEz3Jtzf6uWHR5cUl X-Received: by 2002:a17:906:4047:: with SMTP id y7mr12003771ejj.21.1596560351536; Tue, 04 Aug 2020 09:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596560351; cv=none; d=google.com; s=arc-20160816; b=0V33LpmB3iYDfFITfGL/zsktYyfe5KkFuULP8CNEKIH/yfw/R5LMjRILEWHZz85pWi iLKECDppoKfKwnR4Nq+LX53NMrZrl8zDJETv0k+iNo8EEFmb4eGFKj5Jk6YCmg6UZjOU 6TqVOUSW6ypkCvzy2f+cPeNGJb0MWGaY3s0Uh08eow+MBtaxdSA5I5BurPxSh+9Clbl8 iqTMXyj0WvbRFUz0b0rOUPqBMzvTMNCL5OjPbFzLOusnquGqZNB23kQUoGUEAnBjr5QY Cc14nkhUX6hklnCSBlyzREF6ApD2ABWR8kU+455y+sGShuNISY/xk7uoY8VrqaXwTWiX qhsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sO6tybaMOJ1Y/9jRMHEuMbPOV8G3l1zST2AlvdQbQc4=; b=sWYOJn/nLQ2QJOLq064buJ+nfCr7NcYRpgvoU4gdmTjakGVwW+gyXWIqUL46IErkY+ ow1zL82PioqTddTi39OISEQCsqK/oBo9s3E+AlVzgyxdbRAI8Q3EbFxbMMikO36Es3sd gfWDlt2VQHgF2t5zkjUdP1eVl+m8wvx9qePU1Ehnuow0MiIRGICqLLIysvbNrcrSvvHQ Wq3v1a0388MoCLh5mTBjtgaIPfXyeaT8giEmxbgciYtbDdYDZWovDcCAPRQ4pOcF4SaL JG2/tVIyFtN0kJaJ9vyLrgSvOlIOAYeKhR8FCP0jJol7ytVIKvmeRWFs3U02V15/JmKr o6Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=G5QrEXus; 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 d13si13898263edo.419.2020.08.04.09.58.46; Tue, 04 Aug 2020 09:59:11 -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=@mailerdienst.de header.s=20200217 header.b=G5QrEXus; 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 S1729310AbgHDQ4v (ORCPT + 99 others); Tue, 4 Aug 2020 12:56:51 -0400 Received: from mxwww.masterlogin.de ([95.129.51.220]:46094 "EHLO mxwww.masterlogin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbgHDQ4Q (ORCPT ); Tue, 4 Aug 2020 12:56:16 -0400 Received: from mxout4.routing.net (unknown [192.168.10.112]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id AD31796135; Tue, 4 Aug 2020 16:56:10 +0000 (UTC) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 65C451014A6; Tue, 4 Aug 2020 16:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1596560170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sO6tybaMOJ1Y/9jRMHEuMbPOV8G3l1zST2AlvdQbQc4=; b=G5QrEXusd7O180Uc4HbCX88/NhgIAjUvUG/poFT8KiVuY+bL5KLI7P/3YGHEXMXVv5TjT3 qhJxbMsqIrF5w4ESj438PffNefB0XFfEYy7yyKexhi36jJiz2qIRjPqK+POzfHiQ3Ie6AK op1YFQPXAET5ZGv7kQUNBgD8QrCh2YM= Received: from localhost.localdomain (fttx-pool-217.61.144.119.bambit.de [217.61.144.119]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 5B5443601C7; Tue, 4 Aug 2020 16:56:09 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Landen Chao , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn Subject: [PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings Date: Tue, 4 Aug 2020 18:55:50 +0200 Message-Id: <20200804165555.75159-3-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200804165555.75159-1-linux@fw-web.de> References: <20200804165555.75159-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: 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 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: Landen Chao Signed-off-by: Frank Wunderlich Reviewed-by: Andrew Lunn --- v3->v4 - fix commit-message (hyphernations,capitalisation) as suggested by Russell - add Signed-off-by Landen - dropped wrong signed-off from rene (because previous v1/2 was from him) --- 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/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: -- 2.25.1