]> www.infradead.org Git - users/hch/misc.git/commit
net: phy: realtek: Fix setting of PHY LEDs Mode B bit on RTL8211F
authorSava Jakovljev <savaj@meyersound.com>
Wed, 21 Aug 2024 02:16:57 +0000 (04:16 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 22 Aug 2024 11:00:05 +0000 (13:00 +0200)
commita2f5c505b4378cd6fc7c4a44ff3665ccef2037db
treeba67c64bddcf231ddb64043030357ba4174c59ce
parentf2916c83d746eb99f50f42c15cf4c47c2ea5f3b3
net: phy: realtek: Fix setting of PHY LEDs Mode B bit on RTL8211F

The current implementation incorrectly sets the mode bit of the PHY chip.
Bit 15 (RTL8211F_LEDCR_MODE) should not be shifted together with the
configuration nibble of a LED- it should be set independently of the
index of the LED being configured.
As a consequence, the RTL8211F LED control is actually operating in Mode A.
Fix the error by or-ing final register value to write with a const-value of
RTL8211F_LEDCR_MODE, thus setting Mode bit explicitly.

Fixes: 17784801d888 ("net: phy: realtek: Add support for PHY LEDs on RTL8211F")
Signed-off-by: Sava Jakovljev <savaj@meyersound.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/PAWP192MB21287372F30C4E55B6DF6158C38E2@PAWP192MB2128.EURP192.PROD.OUTLOOK.COM
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/realtek.c