Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4415188pxa; Mon, 10 Aug 2020 08:33:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV140Dd6UDt31gCi2u2Mipxxz69Pewmh52mgNX51DnUD6bHN1AH9tkTQRv8v9U+GRjvapA X-Received: by 2002:a50:954d:: with SMTP id v13mr14780885eda.337.1597073615073; Mon, 10 Aug 2020 08:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597073615; cv=none; d=google.com; s=arc-20160816; b=0VaVR8mh34UgdSmbky0zpbooKGO5B5tBdsHLJ6wWn6RBDlfdcH66egeIfIAwABMpya e1NB5WoY4bKhimL/0iddpxjSO62GfIKGemf9yt4AeqcbiK4R5NPMlo2sRN35EPxPvzEL n5YdvHOu/s3t4Nb44hyojUbD5uoSOyLPWWggjREyeFecEnfm+iqNc5HaREcp0pRSAgcr ciTjCF/WK6yN5jSXkV2afQSG/zkQNoBhVGqOcvlWhxFq4r8wTEPbX4JiKuSiGuJrYOZZ j1Ublt30XVWEMJXX0Jhx0USAVLVaK+cguZ5+uzv/8he3g0HWoWNfsnFsmL15sfMixkJV DrHg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JcrmqNAdJirg2FIR6KVjtOxAEjQEmL5Roq2I0rwEBbo=; b=HBeJo+EA5AIqKNFgjS2zbit+KDbe5lf2E47KEm9zsWlWKVihzemkzd3oMKgScJGojX nSKmSUH9TVH8fiAugczR4N2x10KHwxMhGwjhddSxj2Bp76L/zJ1DgCgvVeWe2gxXkinx hXIIdr+Sm/fT2FjQgVhjbe7KowcKIpJj53/oqKiecSkZDFDhXqtblF4rBixhesSa8Ih2 XdpavsW3IcxNS9Pm6KlLXh8zSqAX+2dxI3dSwpT0fKWpXFARkATEcZ7EP7uc2tjXTGZ/ KDpewI12onjfwHUCqf225HZauV5UvAGGF6kgTOoe7rrwCj3+creRLmP6mACVURd3ZKS3 Ss7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Um8zrUZL; 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 bf8si10323245edb.597.2020.08.10.08.33.11; Mon, 10 Aug 2020 08:33:35 -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=@kernel.org header.s=default header.b=Um8zrUZL; 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 S1729078AbgHJPco (ORCPT + 99 others); Mon, 10 Aug 2020 11:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:37182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729057AbgHJPaW (ORCPT ); Mon, 10 Aug 2020 11:30:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89C1820791; Mon, 10 Aug 2020 15:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597073422; bh=STaAiDozz5Ey94ASQtqCmUMNQiuV/yBML8B1zscPEZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Um8zrUZLsngtYTP7TyyrZxq2uMFVZV3xwFgJOmYZpsfOenMiTczeKKOzGP3ybnvmk Esa+vGKWmzuHa2Y45waM3y7YtL7/bknAkJHYb2srlKJcOkbtwGnvUInxJEXH6m8EGX 7nZoyPSKnSwfVyK+FpaeGf3azu2SColLy6XWoqZo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Landen Chao , Frank Wunderlich , Andrew Lunn , "David S. Miller" Subject: [PATCH 4.19 34/48] net: ethernet: mtk_eth_soc: fix MTU warnings Date: Mon, 10 Aug 2020 17:21:56 +0200 Message-Id: <20200810151805.896505636@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200810151804.199494191@linuxfoundation.org> References: <20200810151804.199494191@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 [ Upstream commit 555a893303872e044fb86f0a5834ce78d41ad2e2 ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2452,6 +2452,8 @@ static int mtk_add_mac(struct mtk_eth *e 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: