Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2817945pxb; Mon, 11 Jan 2021 22:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzS/IW9I5EZK2OtiCHUC25kbg6YLY6H/cPO4FVBKWhLzkifGUoDNTQHnha15ES2eQGZu2wz X-Received: by 2002:a17:906:77c5:: with SMTP id m5mr2024322ejn.424.1610431767605; Mon, 11 Jan 2021 22:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610431767; cv=none; d=google.com; s=arc-20160816; b=O05iwCUWnjJjSxnSthh1gHIOWtRv2ky1cKbWiidGXYiPcyaXoy4JPSPt3eOqd4I+0M IIwlhTPfdFtUV1T3cyFrrq8tl3XJ3IU1NLn/c149HTrj6O7/CgJSAsDUkYneguIZuely r8g2RIno6sz85CunLWOtApjPY7b6EerQFWSLnPadWkZm7MIuJbW7l07PGbcHyk/2qlzd mWP/vRRizzbFpUeYmdyr2CwLjYjW0e1FI4ipp9SGWSUiOqD7qJkdcpq0WYfadRGjru3l c598XbYZPuntRChBpQvyIoZMA+yC4umrGIKuR733IDNjumvu6WoNX5i7o15O4KhP1GUh urew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n1MuBAW551PW0C9N1Dmz3ZvD/sduHHV1J2tKdBuiads=; b=QoBvExbkNsEyMryE9btcRuYvrxdr1JqseybfNxRoKnuF/z9NCItAiRZUPw9CTLLwyq bVYYWw7D3lvYkSTXDB6ZnncjHPCkuz0dV3UcCwWZgmaxgj7rGVkSA9CHdvp8Ezal3AYt Qho9I9BxBXeTpIHuIWc3hvCZ3EDE1GXy9yse5iGJGz27ODjEN/jMDv7dQ2qGoH6QsxFv 16DBHHAwq58I3RKtz5gC9c0N/rIiagFWWF5EK+9Z2ckcDgXvF+eGBfHNhllIMv3u6KHf IfWqzt3ztGEgMRT03KTKmujmjkkjFsnYLRSbJulViL2bRaY42DiWsp4O/bVz/XBaVj7q pXvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=you0VNl8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz3si830053edb.467.2021.01.11.22.09.03; Mon, 11 Jan 2021 22:09:27 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=you0VNl8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731232AbhAKNrN (ORCPT + 99 others); Mon, 11 Jan 2021 08:47:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:57796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731237AbhAKNKk (ORCPT ); Mon, 11 Jan 2021 08:10:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5296022A84; Mon, 11 Jan 2021 13:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370599; bh=+9yfswwQugA173RC8oeaElc2XOJBHyQqg6oBIrY4A1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=you0VNl8DqTquzLBxSv/89xCPtAe9lMGpexnsWoRS+JP5tGsoR7MuTNLBqDjW6ptZ 3Usb5QJASnyoVjb3/Gs3ujLvz7tjkpGL1bP+RWlLltcyGBc7EeuZyXa7YbzORtwgI7 87mo6vus1MixButimZ25BuadU0B0D6Kd7wagXAGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Rasmus Villemoes , Vladimir Oltean , Jakub Kicinski Subject: [PATCH 5.4 16/92] ethernet: ucc_geth: set dev->max_mtu to 1518 Date: Mon, 11 Jan 2021 14:01:20 +0100 Message-Id: <20210111130039.946432272@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130039.165470698@linuxfoundation.org> References: <20210111130039.165470698@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rasmus Villemoes [ Upstream commit 1385ae5c30f238f81bc6528d897c6d7a0816783f ] All the buffers and registers are already set up appropriately for an MTU slightly above 1500, so we just need to expose this to the networking stack. AFAICT, there's no need to implement .ndo_change_mtu when the receive buffers are always set up to support the max_mtu. This fixes several warnings during boot on our mpc8309-board with an embedded mv88e6250 switch: mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 0 ... mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 4 ucc_geth e0102000.ethernet eth1: error -22 setting MTU to 1504 to include DSA overhead The last line explains what the DSA stack tries to do: achieving an MTU of 1500 on-the-wire requires that the master netdevice connected to the CPU port supports an MTU of 1500+the tagging overhead. Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/ucc_geth.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -3890,6 +3890,7 @@ static int ucc_geth_probe(struct platfor INIT_WORK(&ugeth->timeout_work, ucc_geth_timeout_work); netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, 64); dev->mtu = 1500; + dev->max_mtu = 1518; ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT); ugeth->phy_interface = phy_interface;