Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1683633ybt; Thu, 9 Jul 2020 12:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHO1pJzX8LqZTd2NwgLir1kk8GhPc2sKzhu3reZ7UNOXDKzIi/D2z+evu04wOe+jNhb5tS X-Received: by 2002:a17:906:76c4:: with SMTP id q4mr61116475ejn.371.1594324251182; Thu, 09 Jul 2020 12:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594324251; cv=none; d=google.com; s=arc-20160816; b=Xoht3vQm6/yWe+LZj+fMuYeIGJcsq7Dnkvw8+UZYsbnPsW2w395luFxV2zcUsQM2tq dtouU1Ri2uU+kO6oPh/pXkCecVlrio7aT+ok3bXqmgIFXwSPyFX3wxS339XRo+pKQeKQ jSvW965dksAg2E9GFnLGzfpmaAXvgatWzwuDnuTouoMTnlsyCjZa03r0F8vZkJkr/zWR 9nmF/1tmjv3UrjGbio8YXx9WGpuuSnK1PKi8FiZsCto7kJfVc5zWvEmwPxA9flTHQpu3 /VmtQAlCzN1r9vkF0ki1nIOcM+I4ddyV5Iy/gp3eSlBcoN4tjs6kwmmp0/Kk9u/UHSSP 1K/Q== 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:references :in-reply-to:sensitivity:importance:date:subject:cc:to:from :message-id:mime-version:dkim-signature; bh=NM9p2BvH0Kn1yzy9oksXsMvbpL1ZnZLVhNIeXzCjV20=; b=hHV9vIUBr/Ar2q/c6NdT+LsV6+r+0RKoQBF3KB2ManUFjFE0vuCBaBvc0u1aqd6K6n Z6E49lLao7j0idmET6lYjrOjw+RGXub+QXccNi3T1RoB22ukAF17fOyZ9rZqxwwIgPa3 tS2M6O7pPTw+Cm396ujQtGC5Dy/ECAFBPW9dxT3dz4dye34cuq1YM3I0vEX4Jak6qKDP vpDzf3bck8NaNEavyX6xiCHWJNUrunJsf8Knohg0tF5Nqvh28UdLar1Sxi2KUapIDZxW nyy6ZIesMordmGNp8dtzdIjpZSkhFKdenL0+eVS79gkmnt6xLwXDOx4UPgI8vLjVa9bN XzLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=e7IvaRLp; 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 h11si2977574edn.481.2020.07.09.12.50.21; Thu, 09 Jul 2020 12:50:51 -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=e7IvaRLp; 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 S1726648AbgGITuD (ORCPT + 99 others); Thu, 9 Jul 2020 15:50:03 -0400 Received: from mout.gmx.net ([212.227.17.22]:58935 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726605AbgGITsx (ORCPT ); Thu, 9 Jul 2020 15:48:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594324081; bh=qjjKU85vWrmvdFue2XV3Qb2IIMAX9y66v6AoZZPoc2M=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=e7IvaRLpDkT/47bzRnTddtiimKHgCOu//u3jijFPYjXMYg+NwEdyW8xhh/2wlymUH tChSZTTaaVLRdjGn7cNFEpwFWuHkAcOSqFg5XFHSYYOh+whMzslBnIA8N7zaJom7vM bDPbsC3UElWQU7/ODWeeoMn3+uh5uZlNRL8KIojU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [80.208.213.58] ([80.208.213.58]) by web-mail.gmx.net (3c-app-gmx-bap65.server.lan [172.19.172.65]) (via HTTP); Thu, 9 Jul 2020 21:48:01 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: Andrew Lunn Cc: linux-mediatek@lists.infradead.org, =?UTF-8?Q?Ren=C3=A9_van_Dorst?= , 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, Landen Chao Subject: Aw: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning Content-Type: text/plain; charset=UTF-8 Date: Thu, 9 Jul 2020 21:48:01 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20200709134115.GK928075@lunn.ch> References: <20200709055742.3425-1-frank-w@public-files.de> <20200709134115.GK928075@lunn.ch> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:n4zQntLiWUydrYDQKBFrQyQq/zGUb616R6yRiuIW4EkJfjq+54nieuV/hYKY/1qyo45o+ T2AV17jN910J1AYgwwgjqWXNF94zV6gLBYMT9Hl4WOnfgtJTvXNzcnqT/xY+bj7KTOvcfPBe2qLH iufWNu521oC6dI9gX0kLgb9Ft7IHy4L3NXJ8+w0rSZudmHd/G3VMlJ4H2z+UG2OBzWIm2Q5L2Glg rZbzX/ZP8wO9W5+MuBod2H8YjmwO4CiGt4uOWYEiWOSID3DQ8+IH6TSyRDTaIzL/nUQZcmB2n/mo BQ= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RyfU1bnrcBs=:QIrBsHWDa406vNbEkzdDWM tUp9/4HQvksPc36DfD8pCJggCEq1HLpFMZ7/stSKtdVeygNt+Y9lxt6OLVvw1xaZv2RbU7Tag E+21kkdjiVq7f8kNpC+/gFAUrn05JhzoawIW5TbrzE8GjMF50uCs22GqGuVSg3cJrWx375YGV wQkx2xFQNnLIVMGmIVLbxxnlWc/J1EFlJdYuksr4e5IOz0tuQ8/DdV3T5DyI4eYbR/UjC80/T 4aoGD8Si03yFjIOl5qiW8CsqmO8v0HCQzKfPp4P/oYq8iZ9oCNUtFl+ltDcNtK58geEcS2UHw vDJYXH+3VBpKRfWuylYykkNYowZGoKSMjiWrs6O+Qujl9IuHf0HUGdY+XaDO6MMYW4D3DbSuP ME+TY3YICgPwVLz+6JmG2F1J+8T4Wm4/EBIh9hDf3LrfanI1SENfD0iYP3ivPVqLrIJRifAaG fiTazWXG5d12bqqs9u+yKR73kvLIA1wGeyB8hREZf+94XoJe5mw6npVuvXI+EmxNkiyRkHz3Q YnVQGnw3vmJI1Iv8oK0uRTZD/uudXQNQxvdOa2e/kVmUpw3V5cO7wR30jP2AejfrmaxHr1ZdL QWbXmCoyHuQ67WV28L+oyZuzVS4C98uUsZDamcYVFORyri17iJcAOiOM0oe9P6IZ5Fjf406fr +ou5Av5QPvuUnc4CJmeCTwbubuDE48AmBESyFn4O0+cahSCSQ5Ej5hB9Ua7fNAX5mc3M= Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Gesendet: Donnerstag, 09. Juli 2020 um 15:41 Uhr > Von: "Andrew Lunn" > > + eth->netdev[id]->max_mtu =3D 1536; > > I assume this is enough to make the DSA warning go away, but it is the > true max? I have a similar patch for the FEC driver which i should > post sometime. Reviewing the FEC code and after some testing, i found > the real max was 2K - 64. i tried setting only the max_mtu, but the dsa-error is still present mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port 0 but i got it too, if i revert the change...mhm, strange that these were ab= sent last time... the other 2 are fixed with only max_mtu. @andrew where did you got the 2k-64 (=3D1984) information? sounds like orw= ell ;) -95 is EOPNOTSUPP as so far, commit 72579e14a1d3d3d561039dfe7e5f47aaf22e3fd3 introduces the = warning, but the change is making it non-fatal...so i need to adjust my fixes-tag. i guess the real problem lies in this: bfcb813203e6 net: dsa: configure the MTU for switch ports it looks like dsa_slave_change_mtu failes because of missing callback in m= tk_driver (mt7530 for mt7531 in my case). net/dsa/slave.c 1405 static int dsa_slave_change_mtu(struct net_device *dev, int new_mtu) ... 1420 if (!ds->ops->port_change_mtu) 1421 return -EOPNOTSUPP; i added an empty callback to avoid this message, but mtu should be set in = hardware too... here i will ne some assistance from mtk ethernet experts and mt7531 driver= (from landen chao) to be merged first (after some needed changes) =2D-- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2259,6 +2259,12 @@ mt753x_phy_write(struct dsa_switch *ds, int port, i= nt regnum, u16 val) return priv->info->phy_write(ds, port, regnum, val); } +static int +mt753x_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) +{ + return 0; +} + static const struct dsa_switch_ops mt7530_switch_ops =3D { .get_tag_protocol =3D mtk_get_tag_protocol, .setup =3D mt753x_setup, @@ -2281,6 +2287,7 @@ static const struct dsa_switch_ops mt7530_switch_ops= =3D { .port_vlan_del =3D mt7530_port_vlan_del, .port_mirror_add =3D mt7530_port_mirror_add, .port_mirror_del =3D mt7530_port_mirror_del, + .port_change_mtu =3D mt753x_port_change_mtu, .phylink_validate =3D mt753x_phylink_validate, .phylink_mac_link_state =3D mt7530_phylink_mac_link_state, .phylink_mac_config =3D mt753x_phylink_mac_config,