Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2282501pxb; Mon, 11 Jan 2021 06:01:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJznRufZg3vKXQ6I/qie/wC4LQIuQGm21NSW7kQSlBn29gpoyHbxt3SJfDHIi8r5GZL1DJJM X-Received: by 2002:a17:906:98d4:: with SMTP id zd20mr10911816ejb.532.1610373692584; Mon, 11 Jan 2021 06:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610373692; cv=none; d=google.com; s=arc-20160816; b=zVD+AiMBi95MOGLSEhvzwC3ocFi9d+QOLmStHtpHEv6zj3LYJOVXLiR2iGpmklYAdo s5867BCAybuEx5WLES0J0WY+v+KEMPEv8eQAIbi+q1r3gu19QZDlSpNsAYWUtRnn2PPj cHzPgbly4MnpIKjnZijtKPgSLOV9JLq8FBBnyMckWjAh6Y75+JtesW2n3Pwdhw9vwJwE TbnR6CiOi131R3rvYJ3ZiTDd8KH3ydCNSFTe9phSPpk2rHltkfhCyMbk6qW8qlZdqYN3 x3BAX7X5mimEzsXJAfxaYPM98r9tWRfdtChMN+bUHV6Inaz6WqSag2hL2gF+Igwi4a5h qeZQ== 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=KOczX8eB2WOJvbbjL2A9LgpHIFXcJUt0oOS9/YugPS4=; b=zzBXNvWcv1KRLD0DVQg9gcqy6Psfh5j1XFa9z5QgOWOjCxXCKgWKtI0rDyxJ/uRYiV hCTPG+MXE8LeCiXE8pFseUJGGY5LO31kTRMdWrOhOFKRw6KxbR+7IanZkLnlkvTxSA5t 8eGoF37oY+iBcZBfo9RwPV+rYgVFoONqzETCtl37obSvpTpTuoB2AFUz94wwM9gfW4px vbqGmBMjM4kjE7Ho1qdttJxt5PkJCiMhD0VUB7l21HDTy4Eq2Pr5vpIG1YeWM5Cv0koe vhtWFRRJsGCs8G3rpCoGeMG9wrk5zJ0DFulrVNGnpIvMvvGfFXqaX+WBPGlOQIhtLrv/ R4mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OFfl9aJ8; 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 a10si6774087edb.130.2021.01.11.06.01.08; Mon, 11 Jan 2021 06:01:32 -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=OFfl9aJ8; 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 S2388022AbhAKN4a (ORCPT + 99 others); Mon, 11 Jan 2021 08:56:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:54568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730560AbhAKNHR (ORCPT ); Mon, 11 Jan 2021 08:07:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 674AB21973; Mon, 11 Jan 2021 13:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370421; bh=hkFSNNtbWccLQ7znFMeZxP5hZ3nq6YC0ExdlhoqGE/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OFfl9aJ8CklmPTMerRrJkzlbD4AyNILutLkkbGMdi0DhCFmbat6iOBL4GTVC+IwqL x80mmpN0euY5iCNeArQjsQizgxh+HTwfmVLqAr0+Hzy+o3Mmj0QxzhxkDAlGgbf8A8 OHgP5hAgZzI0sutDmyTMEYgviOB4PVH3pX7/otww= 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 4.19 15/77] ethernet: ucc_geth: set dev->max_mtu to 1518 Date: Mon, 11 Jan 2021 14:01:24 +0100 Message-Id: <20210111130037.152367978@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130036.414620026@linuxfoundation.org> References: <20210111130036.414620026@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 @@ -3902,6 +3902,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;