dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Frank Wunderlich <linux@fw-web.de>
To: linux-mediatek@lists.infradead.org
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	Landen Chao <landen.chao@mediatek.com>,
	Frank Wunderlich <frank-w@public-files.de>,
	David Airlie <airlied@linux.ie>,
	netdev@vger.kernel.org, Sean Wang <sean.wang@mediatek.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>, John Crispin <john@phrozen.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Mark Lee <Mark-MC.Lee@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	Felix Fietkau <nbd@nbd.name>
Subject: [PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings
Date: Tue,  4 Aug 2020 18:55:50 +0200	[thread overview]
Message-ID: <20200804165555.75159-3-linux@fw-web.de> (raw)
In-Reply-To: <20200804165555.75159-1-linux@fw-web.de>

From: Landen Chao <landen.chao@mediatek.com>

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 <landen.chao@mediatek.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-08-05  7:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 16:55 [PATCH v4 0/6] make hdmi work on bananapi-r2 Frank Wunderlich
2020-08-04 16:55 ` [PATCH v4 1/6] dt-bindings: mediatek: add mt7623 display-nodes Frank Wunderlich
2020-08-04 17:18   ` Aw: " Frank Wunderlich
2020-08-04 17:22     ` Rob Herring
2020-08-04 23:27   ` Chun-Kuang Hu
2020-08-04 16:55 ` Frank Wunderlich [this message]
2020-08-04 17:20   ` Aw: [PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings Frank Wunderlich
2020-08-04 16:55 ` [PATCH v4 2/6] drm/mediatek: add ddp routing for mt7623 Frank Wunderlich
2020-08-04 23:01   ` Chun-Kuang Hu
2020-08-04 16:55 ` [PATCH v4 3/6] drm/mediatek: disable tmds on mt2701 Frank Wunderlich
2020-08-04 16:55 ` [PATCH v4 4/6] drm/mediatek: Add get_possible_crtc API for dpi, dsi Frank Wunderlich
2020-08-04 16:55 ` [PATCH v4 5/6] drm/mediatek: dpi/dsi: change the getting possible_crtc way Frank Wunderlich
2020-08-04 16:55 ` [PATCH v4 6/6] arm: dts: mt7623: add display subsystem related device nodes Frank Wunderlich
2020-08-04 17:24   ` David Woodhouse
2020-08-04 17:40     ` Aw: " Frank Wunderlich
2020-08-04 18:02       ` David Woodhouse
2020-08-05  7:27         ` Aw: " Frank Wunderlich
2020-08-05  8:36           ` David Woodhouse
2020-08-05  8:49             ` Aw: " Frank Wunderlich
2020-08-05 11:27               ` David Woodhouse
2020-08-05 11:30                 ` [PATCH 1/3] arm: dts: remove stray /dts-v1/ from mt7623a.dtsi David Woodhouse
2020-08-05 11:30                   ` [PATCH 2/3] arm: dts: mt7623: move MT7623N GPU to separate mt7623n.dtsi file David Woodhouse
2020-08-05 13:01                     ` Aw: " Frank Wunderlich
2020-08-05 11:30                   ` [PATCH 3/3] arm: dts: mt7623: add support for UniElec U7623 eMMC David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200804165555.75159-3-linux@fw-web.de \
    --to=linux@fw-web.de \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=airlied@linux.ie \
    --cc=andrew@lunn.ch \
    --cc=chunkuang.hu@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frank-w@public-files.de \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=landen.chao@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).