<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/mediatek, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-09-09T16:43:57Z</updated>
<entry>
<title>net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets</title>
<updated>2025-09-09T16:43:57Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2025-08-31T18:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6220de8a7b40fe9b5ac6f3ce87dbc29df9708155'/>
<id>urn:sha1:6220de8a7b40fe9b5ac6f3ce87dbc29df9708155</id>
<content type='text'>
[ Upstream commit d4736737110ffa83d29f1c5d17b26113864205f6 ]

When sending llc packets with vlan tx offload, the hardware fails to
actually add the tag. Deal with this by fixing it up in software.

Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
Reported-by: Thibaut VARENE &lt;hacks@slashdirt.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20250831182007.51619-1-nbd@nbd.name
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()</title>
<updated>2023-09-23T09:00:01Z</updated>
<author>
<name>Hangyu Hua</name>
</author>
<published>2023-09-08T06:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=653fbddbdfc6673bba01b13dae5a4384ad8f92ec'/>
<id>urn:sha1:653fbddbdfc6673bba01b13dae5a4384ad8f92ec</id>
<content type='text'>
[ Upstream commit e4c79810755f66c9a933ca810da2724133b1165a ]

rule_locs is allocated in ethtool_get_rxnfc and the size is determined by
rule_cnt from user space. So rule_cnt needs to be check before using
rule_locs to avoid NULL pointer dereference.

Fixes: 7aab747e5563 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
Signed-off-by: Hangyu Hua &lt;hbh25y@gmail.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag</title>
<updated>2022-06-22T12:11:21Z</updated>
<author>
<name>Chen Lin</name>
</author>
<published>2022-06-08T12:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e4cab02b7ec6c430577adf1a6434c5c19183d8e'/>
<id>urn:sha1:9e4cab02b7ec6c430577adf1a6434c5c19183d8e</id>
<content type='text'>
[ Upstream commit 2f2c0d2919a14002760f89f4e02960c735a316d2 ]

When rx_flag == MTK_RX_FLAGS_HWLRO,
rx_data_len = MTK_MAX_LRO_RX_LENGTH(4096 * 3) &gt; PAGE_SIZE.
netdev_alloc_frag is for alloction of page fragment only.
Reference to other drivers and Documentation/vm/page_frags.rst

Branch to use __get_free_pages when ring-&gt;frag_size &gt; PAGE_SIZE.

Signed-off-by: Chen Lin &lt;chen45464546@163.com&gt;
Link: https://lore.kernel.org/r/1654692413-2598-1-git-send-email-chen45464546@163.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()</title>
<updated>2022-06-14T16:11:54Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2022-05-26T08:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bd1faedb74dc2a2be3972abcd4239b75a3e7b00'/>
<id>urn:sha1:2bd1faedb74dc2a2be3972abcd4239b75a3e7b00</id>
<content type='text'>
[ Upstream commit e7e7104e2d5ddf3806a28695670f21bef471f1e1 ]

The "fsp-&gt;location" variable comes from user via ethtool_get_rxnfc().
Check that it is valid to prevent an out of bounds read.

Fixes: 7aab747e5563 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mediatek: add missing of_node_put() in mtk_sgmii_init()</title>
<updated>2022-05-12T10:23:45Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-04-28T06:25:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0510b6ccfb4fbfd1535d2b7ec8396c3e4b99cdb1'/>
<id>urn:sha1:0510b6ccfb4fbfd1535d2b7ec8396c3e4b99cdb1</id>
<content type='text'>
commit ff5265d45345d01fefc98fcb9ae891b59633c919 upstream.

The node pointer returned by of_parse_phandle() with refcount incremented,
so add of_node_put() after using it in mtk_sgmii_init().

Fixes: 9ffee4a8276c ("net: ethernet: mediatek: Extend SGMII related functions")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20220428062543.64883-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()</title>
<updated>2022-01-27T08:19:55Z</updated>
<author>
<name>Tom Rix</name>
</author>
<published>2022-01-15T17:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=810d3fac215df89acadbed092f5ccaee59dec751'/>
<id>urn:sha1:810d3fac215df89acadbed092f5ccaee59dec751</id>
<content type='text'>
commit 214b3369ab9b0a6f28d6c970220c209417edbc65 upstream.

Clang static analysis reports this problem
mtk_eth_soc.c:394:7: warning: Branch condition evaluates
  to a garbage value
                if (err)
                    ^~~

err is not initialized and only conditionally set.
So intitialize err.

Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: Fix packet statistics support for MT7628/88</title>
<updated>2021-06-03T06:59:15Z</updated>
<author>
<name>Stefan Roese</name>
</author>
<published>2021-05-22T07:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a052751302b75e2539eb87ec31c696c067a2398d'/>
<id>urn:sha1:a052751302b75e2539eb87ec31c696c067a2398d</id>
<content type='text'>
[ Upstream commit ad79fd2c42f7626bdf6935cd72134c2a5a59ff2d ]

The MT7628/88 SoC(s) have other (limited) packet counter registers than
currently supported in the mtk_eth_soc driver. This patch adds support
for reading these registers, so that the packet statistics are correctly
updated.

Additionally the defines for the non-MT7628 variant packet counter
registers are added and used in this patch instead of using hard coded
values.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Fixes: 296c9120752b ("net: ethernet: mediatek: Add MT7628/88 SoC support")
Cc: Felix Fietkau &lt;nbd@nbd.name&gt;
Cc: John Crispin &lt;john@phrozen.org&gt;
Cc: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Cc: Reto Schneider &lt;code@reto-schneider.ch&gt;
Cc: Reto Schneider &lt;reto.schneider@husqvarnagroup.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix RX VLAN offload</title>
<updated>2021-05-19T08:08:24Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2021-04-23T05:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98e1d0fe20ed210d04f3fff9cd68bf52e005d901'/>
<id>urn:sha1:98e1d0fe20ed210d04f3fff9cd68bf52e005d901</id>
<content type='text'>
[ Upstream commit 3f57d8c40fea9b20543cab4da12f4680d2ef182c ]

The VLAN ID in the rx descriptor is only valid if the RX_DMA_VTAG bit is
set. Fixes frames wrongly marked with VLAN tags.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
[Ilya: fix commit message]
Signed-off-by: Ilya Lipnitskiy &lt;ilya.lipnitskiy@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix MTU warnings</title>
<updated>2020-08-11T13:33:39Z</updated>
<author>
<name>Landen Chao</name>
</author>
<published>2020-07-29T08:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f9354702ca5aa059978d27c7279f98fbe431490'/>
<id>urn:sha1:6f9354702ca5aa059978d27c7279f98fbe431490</id>
<content type='text'>
[ 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 &lt;landen.chao@mediatek.com&gt;
Signed-off-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: Always call mtk_gmac0_rgmii_adjust() for mt7623</title>
<updated>2020-08-11T13:33:37Z</updated>
<author>
<name>René van Dorst</name>
</author>
<published>2020-07-23T19:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb96e4f71f5999ca8f4b5c2e0cb9d126ed363ef8'/>
<id>urn:sha1:eb96e4f71f5999ca8f4b5c2e0cb9d126ed363ef8</id>
<content type='text'>
[ Upstream commit 19016d93bfc335f0c158c0d9e3b9d06c4dd53d39 ]

Modify mtk_gmac0_rgmii_adjust() so it can always be called.
mtk_gmac0_rgmii_adjust() sets-up the TRGMII clocks.

Signed-off-by: René van Dorst &lt;opensource@vdorst.com&gt;
Signed-off-By: David Woodhouse &lt;dwmw2@infradead.org&gt;
Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
