<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net, branch v2022.01-rc4</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>WS cleanup: remove trailing empty lines</title>
<updated>2021-09-30T12:08:56+00:00</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2021-09-27T15:42:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=66356b4c06c934021f6cb58d93877427162b369f'/>
<id>66356b4c06c934021f6cb58d93877427162b369f</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'network_master' of https://source.denx.de/u-boot/custodians/u-boot-net into next</title>
<updated>2021-09-29T11:58:20+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-09-29T11:58:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6eecaf5d0f6b9a500dd5798f1f2bc8296bcfe158'/>
<id>6eecaf5d0f6b9a500dd5798f1f2bc8296bcfe158</id>
<content type='text'>
- Fix some non-NULL terminated strings in the networking subsystem
- net: tsec: Mark tsec_get_interface as __maybe_unused
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix some non-NULL terminated strings in the networking subsystem
- net: tsec: Mark tsec_get_interface as __maybe_unused
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: ensure port names are NULL-terminated after DSA_PORT_NAME_LENGTH truncation</title>
<updated>2021-09-28T15:50:57+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-09-27T11:22:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4fdc7e3530eb49dfe0aca79746b1cda30e94c591'/>
<id>4fdc7e3530eb49dfe0aca79746b1cda30e94c591</id>
<content type='text'>
strncpy() simply bails out when copying a source string whose size
exceeds the destination string size, potentially leaving the destination
string unterminated.

One possible way to address is to pass DSA_PORT_NAME_LENGTH - 1 and a
previously zero-initialized destination string, but this is more
difficult to maintain.

The chosen alternative is to use strlcpy(), which properly limits the
copy len in the (srclen &gt;= size) case to "size - 1", and which is also
more efficient than the strncpy() byte-by-byte implementation by using
memcpy. The destination string returned by strlcpy() is always NULL
terminated.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
strncpy() simply bails out when copying a source string whose size
exceeds the destination string size, potentially leaving the destination
string unterminated.

One possible way to address is to pass DSA_PORT_NAME_LENGTH - 1 and a
previously zero-initialized destination string, but this is more
difficult to maintain.

The chosen alternative is to use strlcpy(), which properly limits the
copy len in the (srclen &gt;= size) case to "size - 1", and which is also
more efficient than the strncpy() byte-by-byte implementation by using
memcpy. The destination string returned by strlcpy() is always NULL
terminated.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mdio-uclass: rewrite dm_mdio_post_probe using strlcpy</title>
<updated>2021-09-28T15:50:57+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-09-27T11:22:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bf35c3121aa58eec03990bd5bd83ad1576106046'/>
<id>bf35c3121aa58eec03990bd5bd83ad1576106046</id>
<content type='text'>
dm_mdio_post_probe used to be vulnerable after truncation, but has been
patched by commit 398e7512d8d7 ("net: Fix Covarity Defect 244093").
Nonetheless, we can use strlcpy like the rest of the code base now,
which yields the same result.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dm_mdio_post_probe used to be vulnerable after truncation, but has been
patched by commit 398e7512d8d7 ("net: Fix Covarity Defect 244093").
Nonetheless, we can use strlcpy like the rest of the code base now,
which yields the same result.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: remove unused variables</title>
<updated>2021-09-28T15:50:56+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-09-18T11:49:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5ecdf0a5a42ae3b2d04cdf0c2ad6314670839037'/>
<id>5ecdf0a5a42ae3b2d04cdf0c2ad6314670839037</id>
<content type='text'>
"dev" and "dsa_pdata" are unused inside dsa_port_of_to_pdata.

"dsa_priv" is unused inside dsa_port_probe.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"dev" and "dsa_pdata" are unused inside dsa_port_of_to_pdata.

"dsa_priv" is unused inside dsa_port_probe.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: pass CPU port fixed PHY to .port_disable</title>
<updated>2021-09-28T15:50:56+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-09-18T11:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5cc283b781398a02c8a7c919cf4d5dbb5fa8add2'/>
<id>5cc283b781398a02c8a7c919cf4d5dbb5fa8add2</id>
<content type='text'>
While adding the logic for DSA to register a fixed-link PHY for the CPU
port, I forgot to pass it to the .port_disable method too, just
.port_enable.

Bug had no impact for felix_switch.c, due to the phy argument not being
used, but ksz9477.c does use it =&gt; NULL pointer dereference.

Fixes: fc054d563bfb ("net: Introduce DSA class for Ethernet switches")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While adding the logic for DSA to register a fixed-link PHY for the CPU
port, I forgot to pass it to the .port_disable method too, just
.port_enable.

Bug had no impact for felix_switch.c, due to the phy argument not being
used, but ksz9477.c does use it =&gt; NULL pointer dereference.

Fixes: fc054d563bfb ("net: Introduce DSA class for Ethernet switches")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: introduce a .port_probe() method in struct dsa_ops</title>
<updated>2021-09-28T15:50:56+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-08-24T12:00:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4b46e8388549bd0e52ec742c7e5ed71e0edc1b9f'/>
<id>4b46e8388549bd0e52ec742c7e5ed71e0edc1b9f</id>
<content type='text'>
Some drivers might want to execute code for each port at probe time, as
opposed to executing code just-in-time for the port selected for
networking.

To cater to that use case, introduce a .port_probe() callback method
into the DSA switch operations which is called for each available port,
at the end of dsa_port_probe().

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some drivers might want to execute code for each port at probe time, as
opposed to executing code just-in-time for the port selected for
networking.

To cater to that use case, introduce a .port_probe() callback method
into the DSA switch operations which is called for each available port,
at the end of dsa_port_probe().

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: refactor the code to set the port MAC address into a dedicated function</title>
<updated>2021-09-28T15:50:55+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-08-24T12:00:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5eee5ab91638c4482dd59ff511feefd3b15a2472'/>
<id>5eee5ab91638c4482dd59ff511feefd3b15a2472</id>
<content type='text'>
This snippet of code has a bothering "if (...) return 0" in it which
assumes it is the last piece of code running in dsa_port_probe().

This makes it difficult to add further code at the end of dsa_port_probe()
which does not depend on MAC address stuff.

So move the code to a dedicated function which returns void and let the
code flow through.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This snippet of code has a bothering "if (...) return 0" in it which
assumes it is the last piece of code running in dsa_port_probe().

This makes it difficult to add further code at the end of dsa_port_probe()
which does not depend on MAC address stuff.

So move the code to a dedicated function which returns void and let the
code flow through.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: dsa: use "err" instead of "ret" in dsa_port_probe</title>
<updated>2021-09-28T15:50:55+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-08-24T12:00:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f4b712b840dd5fe0b984aadfe466c1886a31e906'/>
<id>f4b712b840dd5fe0b984aadfe466c1886a31e906</id>
<content type='text'>
DM DSA uses "err" for error code values, so use this consistently.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DM DSA uses "err" for error code values, so use this consistently.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Tested-by: Michael Walle &lt;michael@walle.cc&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove #include &lt;timestamp.h&gt; from files which do not need it</title>
<updated>2021-09-17T16:10:44+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-02T13:18:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0072f5fce3c981de626ae2b334bbdf7ecf362586'/>
<id>0072f5fce3c981de626ae2b334bbdf7ecf362586</id>
<content type='text'>
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
