<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/dsa/realtek, branch linux-6.9.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-27T11:52:14+00:00</updated>
<entry>
<title>net: dsa: realtek: do not assert reset on remove</title>
<updated>2024-06-27T11:52:14+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-04-27T05:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=846c73652221993b678d3830ba02d67c8fa48d4e'/>
<id>urn:sha1:846c73652221993b678d3830ba02d67c8fa48d4e</id>
<content type='text'>
[ Upstream commit 4f580e9aced1816398c1c64f178302a22b8ea6e2 ]

The necessity of asserting the reset on removal was previously
questioned, as DSA's own cleanup methods should suffice to prevent
traffic leakage[1].

When a driver has subdrivers controlled by devres, they will be
unregistered after the main driver's .remove is executed. If it asserts
a reset, the subdrivers will be unable to communicate with the hardware
during their cleanup. For LEDs, this means that they will fail to turn
off, resulting in a timeout error.

[1] https://lore.kernel.org/r/20240123215606.26716-9-luizluca@gmail.com/

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.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: dsa: realtek: keep default LED state in rtl8366rb</title>
<updated>2024-06-27T11:52:14+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-04-27T05:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b12fb93e18bf632f2aa12010f0c17591ed3e9f24'/>
<id>urn:sha1:b12fb93e18bf632f2aa12010f0c17591ed3e9f24</id>
<content type='text'>
[ Upstream commit 5edc6585aafefa3d44fb8a84adf241d90227f7a3 ]

This switch family supports four LEDs for each of its six ports. Each
LED group is composed of one of these four LEDs from all six ports. LED
groups can be configured to display hardware information, such as link
activity, or manually controlled through a bitmap in registers
RTL8366RB_LED_0_1_CTRL_REG and RTL8366RB_LED_2_3_CTRL_REG.

After a reset, the default LED group configuration for groups 0 to 3
indicates, respectively, link activity, link at 1000M, 100M, and 10M, or
RTL8366RB_LED_CTRL_REG as 0x5432. These configurations are commonly used
for LED indications. However, the driver was replacing that
configuration to use manually controlled LEDs (RTL8366RB_LED_FORCE)
without providing a way for the OS to control them. The default
configuration is deemed more useful than fixed, uncontrollable turned-on
LEDs.

The driver was enabling/disabling LEDs during port_enable/disable.
However, these events occur when the port is administratively controlled
(up or down) and are not related to link presence. Additionally, when a
port N was disabled, the driver was turning off all LEDs for group N,
not only the corresponding LED for port N in any of those 4 groups. In
such cases, if port 0 was brought down, the LEDs for all ports in LED
group 0 would be turned off. As another side effect, the driver was
wrongly warning that port 5 didn't have an LED ("no LED for port 5").
Since showing the administrative state of ports is not an orthodox way
to use LEDs, it was not worth it to fix it and all this code was
dropped.

The code to disable LEDs was simplified only changing each LED group to
the RTL8366RB_LED_OFF state. Registers RTL8366RB_LED_0_1_CTRL_REG and
RTL8366RB_LED_2_3_CTRL_REG are only used when the corresponding LED
group is configured with RTL8366RB_LED_FORCE and they don't need to be
cleaned. The code still references an LED controlled by
RTL8366RB_INTERRUPT_CONTROL_REG, but as of now, no test device has
actually used it. Also, some magic numbers were replaced by macros.

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.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: dsa: realtek: support reset controller</title>
<updated>2024-02-28T08:21:41+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-25T16:29:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56998aa6b7f0f31ce8df23c00701af2d8e8a1f1a'/>
<id>urn:sha1:56998aa6b7f0f31ce8df23c00701af2d8e8a1f1a</id>
<content type='text'>
Add support for resetting the device using a reset controller,
complementing the existing GPIO reset functionality (reset-gpios).

Although the reset is optional and the driver performs a soft reset
during setup, if the initial reset pin state was asserted, the driver
will not detect the device until the reset is deasserted.

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&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: realtek: fix digital interface select macro for EXT0</title>
<updated>2024-02-14T02:53:11+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-12T21:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32e4a5447ed9fa904a2dfcf4609c64bce053b4e8'/>
<id>urn:sha1:32e4a5447ed9fa904a2dfcf4609c64bce053b4e8</id>
<content type='text'>
While no supported devices currently utilize EXT0, the register reserves
the bits for an EXT0. EXT0 is utilized by devices from the generation
prior to rtl8365mb, such as those supported by the driver library
rtl8367b.

Signed-off-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;
Link: https://lore.kernel.org/r/20240212-realtek-fix_ext0-v1-1-f3d2536d191a@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: realtek: embed dsa_switch into realtek_priv</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9fc469b2943d9b1ff2a7800f823e7cd7a5cac0ca'/>
<id>urn:sha1:9fc469b2943d9b1ff2a7800f823e7cd7a5cac0ca</id>
<content type='text'>
Embed dsa_switch within realtek_priv to eliminate the need for a second
memory allocation.

Suggested-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&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: use the same mii bus driver for both interfaces</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bba140a566ed075304c49c52ab32c0016cab624a'/>
<id>urn:sha1:bba140a566ed075304c49c52ab32c0016cab624a</id>
<content type='text'>
The realtek-mdio will now use this driver instead of the generic DSA
driver ("dsa user smi"), which should not be used with OF[1].

With a single ds_ops for both interfaces, the ds_ops in realtek_priv is
no longer necessary. Now, the realtek_variant.ds_ops can be used
directly.

The realtek_priv.setup_interface() has been removed as we can directly
call the new common function.

[1] https://lkml.kernel.org/netdev/20220630200423.tieprdu5fpabflj7@bang-olufsen.dk/T/

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&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: migrate user_mii_bus setup to realtek_dsa</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b4bd77971f3c290c4694ed710cc6967593b10bc2'/>
<id>urn:sha1:b4bd77971f3c290c4694ed710cc6967593b10bc2</id>
<content type='text'>
In the user MDIO driver, despite numerous references to SMI, including
its compatible string, there's nothing inherently specific about the SMI
interface in the user MDIO bus. Consequently, the code has been migrated
to the rtl83xx module. All references to SMI have been eliminated.

The MDIO bus id was changed from Realtek-&lt;switch id&gt; to the switch
devname suffixed with :user_mii, giving more information about the bus
it is referencing.

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@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: clean user_mii_bus setup</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68c66d8d8a19088967a0ab6bb98cb5ecc80ca0be'/>
<id>urn:sha1:68c66d8d8a19088967a0ab6bb98cb5ecc80ca0be</id>
<content type='text'>
Remove the line assigning dev.of_node in mdio_bus as subsequent
of_mdiobus_register will always overwrite it.

As discussed in [1], allow the DSA core to be simplified, by not
assigning ds-&gt;user_mii_bus when the MDIO bus is described in OF, as it
is unnecessary.

Since commit 3b73a7b8ec38 ("net: mdio_bus: add refcounting for fwnodes
to mdiobus"), we can put the "mdio" node just after the MDIO bus
registration.

[1] https://lkml.kernel.org/netdev/20231213120656.x46fyad6ls7sqyzv@skbuf/T/#u

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&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: get internal MDIO node by name</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8685c98d45c54346caf005de69988e13c731c533'/>
<id>urn:sha1:8685c98d45c54346caf005de69988e13c731c533</id>
<content type='text'>
The binding docs requires for SMI-connected devices that the switch
must have a child node named "mdio" and with a compatible string of
"realtek,smi-mdio". Meanwile, for MDIO-connected switches, the binding
docs only requires a child node named "mdio".

This patch changes the driver to use the common denominator for both
interfaces, looking for the MDIO node by name, ignoring the compatible
string.

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.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: merge rtl83xx and interface modules into realtek_dsa</title>
<updated>2024-02-12T10:42:17+00:00</updated>
<author>
<name>Luiz Angelo Daros de Luca</name>
<email>luizluca@gmail.com</email>
</author>
<published>2024-02-09T05:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98b75c1c149c653ad11a440636213eb070325158'/>
<id>urn:sha1:98b75c1c149c653ad11a440636213eb070325158</id>
<content type='text'>
Since rtl83xx and realtek-{smi,mdio} are always loaded together,
we can optimize resource usage by consolidating them into a single
module.

Signed-off-by: Luiz Angelo Daros de Luca &lt;luizluca@gmail.com&gt;
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.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>
</feed>
