<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/net/ravb.c, branch master</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>net: ravb: Configure CXR31 and CXR35 on rzg2l</title>
<updated>2025-12-23T14:35:34+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2025-12-10T14:17:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0c230a3a8ef46f76a730324f44da96c713088825'/>
<id>0c230a3a8ef46f76a730324f44da96c713088825</id>
<content type='text'>
As in Linux with d78c0ced60 ("net: ravb: Make write access to CXR35 first
before accessing other EMAC register"), configure CXR31 and CXR35 correctly
on rzg2. MII mode does not work correctly unless those registers are
properly configured.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As in Linux with d78c0ced60 ("net: ravb: Make write access to CXR35 first
before accessing other EMAC register"), configure CXR31 and CXR35 correctly
on rzg2. MII mode does not work correctly unless those registers are
properly configured.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Add RZ/G2L Support</title>
<updated>2025-05-04T18:25:03+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul.barker.ct@bp.renesas.com</email>
</author>
<published>2025-03-19T12:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2fc48febcd052a10d7a645f0c0d1f923bbc0f7bd'/>
<id>2fc48febcd052a10d7a645f0c0d1f923bbc0f7bd</id>
<content type='text'>
The Renesas R9A07G044L (RZ/G2L) SoC includes two Gigabit Ethernet
interfaces which can be supported using the ravb driver. Some RZ/G2L
specific steps need to be taken during initialization due to differences
between this SoC and previously supported SoCs. We also need to ensure
that the module reset is de-asserted after the module clock is enabled
but before any Ethernet register reads/writes take place.

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Renesas R9A07G044L (RZ/G2L) SoC includes two Gigabit Ethernet
interfaces which can be supported using the ravb driver. Some RZ/G2L
specific steps need to be taken during initialization due to differences
between this SoC and previously supported SoCs. We also need to ensure
that the module reset is de-asserted after the module clock is enabled
but before any Ethernet register reads/writes take place.

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Add optional reset deassertion</title>
<updated>2025-05-04T18:25:03+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul.barker.ct@bp.renesas.com</email>
</author>
<published>2025-03-19T12:03:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46706c3427e7537bbb7bc6ab3742a5b74b996f73'/>
<id>46706c3427e7537bbb7bc6ab3742a5b74b996f73</id>
<content type='text'>
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we introduce optional de-assertion and re-assertion of
a reset signal in ravb_probe() and ravb_remove().

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we introduce optional de-assertion and re-assertion of
a reset signal in ravb_probe() and ravb_remove().

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Refactor out R-Car specific code</title>
<updated>2025-05-04T18:25:03+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul.barker.ct@bp.renesas.com</email>
</author>
<published>2025-03-19T12:03:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba2d1d7666cb88f5efdfd4ad1fd89a02603269b2'/>
<id>ba2d1d7666cb88f5efdfd4ad1fd89a02603269b2</id>
<content type='text'>
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we move all R-Car specific code into new functions and
introduce a device_ops function pointer table.

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we move all R-Car specific code into new functions and
introduce a device_ops function pointer table.

Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Fix RX error handling</title>
<updated>2025-05-04T18:23:31+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-04-20T16:35:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6fae565f5477f0e1c8df2271cc8bedaca5b63759'/>
<id>6fae565f5477f0e1c8df2271cc8bedaca5b63759</id>
<content type='text'>
Correctly handle RX errors in ravb_recv() by returning 0 instead
of -EAGAIN on RX error.

In case the RAVB driver detects an RX error in ravb_recv(), it must
not return the -EAGAIN, but instead must return 0. Both error codes
are handled in eth-uclass.c eth_rx() and -EAGAIN is rewritten to 0
at the end of eth_rx(), but negative return code from the .recv()
callback does not trigger .free_pkt() callback, which would clean
up and re-enqueue the descriptor which holds the currently received
corrupted packet. The .free_pkt() must be called for this descriptor,
otherwise the follow up received data become corrupted too, even if
those packets are correctly received. Returning 0 from the .recv()
callback assures the corrupted packet is not processed by the network
stack, but is skipped instead.

For TFTP loading, an RX error produces the timeout "T" output and
resumes the TFTP loading operation shortly afterward, without any
data corruption.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correctly handle RX errors in ravb_recv() by returning 0 instead
of -EAGAIN on RX error.

In case the RAVB driver detects an RX error in ravb_recv(), it must
not return the -EAGAIN, but instead must return 0. Both error codes
are handled in eth-uclass.c eth_rx() and -EAGAIN is rewritten to 0
at the end of eth_rx(), but negative return code from the .recv()
callback does not trigger .free_pkt() callback, which would clean
up and re-enqueue the descriptor which holds the currently received
corrupted packet. The .free_pkt() must be called for this descriptor,
otherwise the follow up received data become corrupted too, even if
those packets are correctly received. Returning 0 from the .recv()
callback assures the corrupted packet is not processed by the network
stack, but is skipped instead.

For TFTP loading, an RX error produces the timeout "T" output and
resumes the TFTP loading operation shortly afterward, without any
data corruption.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Fix error handling in ravb_probe</title>
<updated>2025-03-19T02:37:41+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul.barker.ct@bp.renesas.com</email>
</author>
<published>2025-03-04T20:07:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=667ab63f931bc16b38c1ce87f57a4914c1c7bcfa'/>
<id>667ab63f931bc16b38c1ce87f57a4914c1c7bcfa</id>
<content type='text'>
In ravb_probe(), we were missing a couple of things in the error
handling path:

  * We must unregister the MDIO bus before freeing the corresponding
    struct mii_dev instance to avoid the potential for use-after-free
    bugs.

  * We must free the resources acquired by clk_get_bulk() even if the
    clocks have not yet been enabled.

Fixes: 8ae51b6f324e ("net: ravb: Add Renesas Ethernet RAVB driver")
Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In ravb_probe(), we were missing a couple of things in the error
handling path:

  * We must unregister the MDIO bus before freeing the corresponding
    struct mii_dev instance to avoid the potential for use-after-free
    bugs.

  * We must free the resources acquired by clk_get_bulk() even if the
    clocks have not yet been enabled.

Fixes: 8ae51b6f324e ("net: ravb: Add Renesas Ethernet RAVB driver")
Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Fix RX frame size limit</title>
<updated>2025-03-11T22:06:18+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul.barker.ct@bp.renesas.com</email>
</author>
<published>2025-03-04T20:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4226433858318be5914688963436ad41cbe2298d'/>
<id>4226433858318be5914688963436ad41cbe2298d</id>
<content type='text'>
The value written to the RFLR register includes the length of the CRC
data at the end of each Ethernet frame. So we need to increase the value
written to this register to ensure that we can receive full size frames.

While we're here we can also copy the improved comment from the Linux
kernel.

Fixes: 8ae51b6f324e ("net: ravb: Add Renesas Ethernet RAVB driver")
Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt; # Fix comment
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The value written to the RFLR register includes the length of the CRC
data at the end of each Ethernet frame. So we need to increase the value
written to this register to ensure that we can receive full size frames.

While we're here we can also copy the improved comment from the Linux
kernel.

Fixes: 8ae51b6f324e ("net: ravb: Add Renesas Ethernet RAVB driver")
Signed-off-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt; # Fix comment
Reviewed-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ravb: Switch back to mdio_alloc()</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=877e29cfb1a72d929e79a66281228010d330c7f5'/>
<id>877e29cfb1a72d929e79a66281228010d330c7f5</id>
<content type='text'>
Use mdio_alloc() again to allocate MDIO bus. This is possible
because all the miiphybb parameters and ops passing is handled in
at bb_miiphy_read()/bb_miiphy_write() level.

This also fixes previously missed bb_miiphy_free() in .remove
callback of this driver. which does not pose a problem anymore.

Fixes: 079eaca6e7b4 ("net: ravb: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks")
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use mdio_alloc() again to allocate MDIO bus. This is possible
because all the miiphybb parameters and ops passing is handled in
at bb_miiphy_read()/bb_miiphy_write() level.

This also fixes previously missed bb_miiphy_free() in .remove
callback of this driver. which does not pose a problem anymore.

Fixes: 079eaca6e7b4 ("net: ravb: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks")
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Drop priv from struct bb_miiphy_bus</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=596d67e5163834893e9b59d7a5cb9e9a1cd8bc24'/>
<id>596d67e5163834893e9b59d7a5cb9e9a1cd8bc24</id>
<content type='text'>
Remove the priv member from struct bb_miiphy_bus and its assignment
from drivers. This turns struct bb_miiphy_bus int struct mii_dev
wrapper, to be cleaned up next.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the priv member from struct bb_miiphy_bus and its assignment
from drivers. This turns struct bb_miiphy_bus int struct mii_dev
wrapper, to be cleaned up next.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: miiphybb: Pass struct mii_dev directly to bb_miiphy_read/write()</title>
<updated>2025-03-11T22:05:57+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-03-02T01:24:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7cded10da35730ff27062d19b8ad72242be8038f'/>
<id>7cded10da35730ff27062d19b8ad72242be8038f</id>
<content type='text'>
Access to MDIO bus private data can be provided by both
struct mii_dev .priv member and struct bb_miiphy_bus .priv
member, use the former directly and remove .priv from the
later. Drop unused bb_miiphy_getbus(). This removes any
dependency on struct bb_miiphy_bus from the miiphybb code,
except for helper functions which will be removed later.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Access to MDIO bus private data can be provided by both
struct mii_dev .priv member and struct bb_miiphy_bus .priv
member, use the former directly and remove .priv from the
later. Drop unused bb_miiphy_getbus(). This removes any
dependency on struct bb_miiphy_bus from the miiphybb code,
except for helper functions which will be removed later.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Paul Barker &lt;paul.barker.ct@bp.renesas.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
