<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/dsa/realtek, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-10-24T20:08:14Z</updated>
<entry>
<title>net: dsa: Use conduit and user terms</title>
<updated>2023-10-24T20:08:14Z</updated>
<author>
<name>Florian Fainelli</name>
</author>
<published>2023-10-23T18:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ca80638b90cec66547011ee1ef79e534589989a'/>
<id>urn:sha1:6ca80638b90cec66547011ee1ef79e534589989a</id>
<content type='text'>
Use more inclusive terms throughout the DSA subsystem by moving away
from "master" which is replaced by "conduit" and "slave" which is
replaced by "user". No functional changes.

Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Reviewed-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Signed-off-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Link: https://lore.kernel.org/r/20231023181729.1191071-2-florian.fainelli@broadcom.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: rtl8365mb: replace deprecated strncpy with ethtool_sprintf</title>
<updated>2023-10-11T03:05:23Z</updated>
<author>
<name>Justin Stitt</name>
</author>
<published>2023-10-09T22:43:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5f061d5e340fefc663cacfe8f42f149d55bdb53'/>
<id>urn:sha1:e5f061d5e340fefc663cacfe8f42f149d55bdb53</id>
<content type='text'>
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

ethtool_sprintf() is designed specifically for get_strings() usage.
Let's replace strncpy in favor of this more robust and easier to
understand interface.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Reviewed-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-realtek-rtl8365mb-c-v1-1-0537fe9fb08c@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: replace deprecated strncpy with ethtool_sprintf</title>
<updated>2023-10-11T03:02:59Z</updated>
<author>
<name>Justin Stitt</name>
</author>
<published>2023-10-09T22:47:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0e4a14f5ba125be14a557ff3ac890ad0aacfc26'/>
<id>urn:sha1:b0e4a14f5ba125be14a557ff3ac890ad0aacfc26</id>
<content type='text'>
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.

ethtool_sprintf() is designed specifically for get_strings() usage.
Let's replace strncpy in favor of this more robust and easier to
understand interface.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-realtek-rtl8366-core-c-v1-1-74e1b5190778@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: Convert to platform remove callback returning void</title>
<updated>2023-09-20T09:25:58Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-09-18T19:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d48a5472b8f2b29800bb25913f9403765005f1bc'/>
<id>urn:sha1:d48a5472b8f2b29800bb25913f9403765005f1bc</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: rtl8366rb: Implement setting up link on CPU port</title>
<updated>2023-09-15T09:37:07Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2023-09-12T21:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c192ce9ff1d93f004fa6cdc0f567f5ab3dd4feb'/>
<id>urn:sha1:7c192ce9ff1d93f004fa6cdc0f567f5ab3dd4feb</id>
<content type='text'>
We auto-negotiate most ports in the RTL8366RB driver, but
the CPU port is hard-coded to 1Gbit, full duplex, tx and
rx pause.

This isn't very nice. People may configure speed and
duplex differently in the device tree.

Actually respect the arguments passed to the function for
the CPU port, which get passed properly after Russell's
patch "net: dsa: realtek: add phylink_get_caps implementation"

After this the link is still set up properly.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: add phylink_get_caps implementation</title>
<updated>2023-08-20T10:38:43Z</updated>
<author>
<name>Russell King (Oracle)</name>
</author>
<published>2023-08-19T11:11:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b22eef6864caadd2199e3db0be7235c176a04f89'/>
<id>urn:sha1:b22eef6864caadd2199e3db0be7235c176a04f89</id>
<content type='text'>
The user ports use RSGMII, but we don't have that, and DT doesn't
specify a phy interface mode, so phylib defaults to GMII. These support
1G, 100M and 10M with flow control. It is unknown whether asymetric
pause is supported at all speeds.

The CPU port uses MII/GMII/RGMII/REVMII by hardware pin strapping,
and support speeds specific to each, with full duplex only supported
in some modes. Flow control may be supported again by hardware pin
strapping, and theoretically is readable through a register but no
information is given in the datasheet for that.

So, we do a best efforts - and be lenient.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: Remove redundant of_match_ptr()</title>
<updated>2023-08-16T08:59:40Z</updated>
<author>
<name>Ruan Jinjie</name>
</author>
<published>2023-08-14T02:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aae249dfa089c0c9d845ef18d70c0b7ef367df64'/>
<id>urn:sha1:aae249dfa089c0c9d845ef18d70c0b7ef367df64</id>
<content type='text'>
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie &lt;ruanjinjie@huawei.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: Explicitly include correct DT includes</title>
<updated>2023-07-27T04:54:16Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2023-07-24T21:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f44a90104ee5aceaf39b5a10787ab34c46c987ba'/>
<id>urn:sha1:f44a90104ee5aceaf39b5a10787ab34c46c987ba</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Link: https://lore.kernel.org/r/20230724211859.805481-1-robh@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2023-03-30T21:43:03Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2023-03-30T21:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79548b7984e4c606c6caaad72a0864a83855ebc9'/>
<id>urn:sha1:79548b7984e4c606c6caaad72a0864a83855ebc9</id>
<content type='text'>
Conflicts:

drivers/net/ethernet/mediatek/mtk_ppe.c
  3fbe4d8c0e53 ("net: ethernet: mtk_eth_soc: ppe: add support for flow accounting")
  924531326e2d ("net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow")

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: fix out-of-bounds access</title>
<updated>2023-03-25T02:04:43Z</updated>
<author>
<name>Ahmad Fatoum</name>
</author>
<published>2023-03-23T10:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b93eb564869321d0dffaf23fcc5c88112ed62466'/>
<id>urn:sha1:b93eb564869321d0dffaf23fcc5c88112ed62466</id>
<content type='text'>
The probe function sets priv-&gt;chip_data to (void *)priv + sizeof(*priv)
with the expectation that priv has enough trailing space.

However, only realtek-smi actually allocated this chip_data space.
Do likewise in realtek-mdio to fix out-of-bounds accesses.

These accesses likely went unnoticed so far, because of an (unused)
buf[4096] member in struct realtek_priv, which caused kmalloc to
round up the allocated buffer to a big enough size, so nothing of
value was overwritten. With a different allocator (like in the barebox
bootloader port of the driver) or with KASAN, the memory corruption
becomes quickly apparent.

Fixes: aac94001067d ("net: dsa: realtek: add new mdio interface for drivers")
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230323103735.2331786-1-a.fatoum@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
