]> www.infradead.org Git - nvme.git/commit
net: phy: realtek: add support for RTL8366S Gigabit PHY
authorMark Mentovai <mark@mentovai.com>
Thu, 25 Jul 2024 20:41:44 +0000 (16:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jul 2024 13:29:06 +0000 (14:29 +0100)
commit225990c487c1023e7b3aa89beb6a68011fbc0461
treec301aefdbd872f25006203e6bafaa03b19a8701b
parent2191a54f63225b548fd8346be3611c3219a24738
net: phy: realtek: add support for RTL8366S Gigabit PHY

The PHY built in to the Realtek RTL8366S switch controller was
previously supported by genphy_driver. This PHY does not implement MMD
operations. Since commit 9b01c885be36 ("net: phy: c22: migrate to
genphy_c45_write_eee_adv()"), MMD register reads have been made during
phy_probe to determine EEE support. For genphy_driver, these reads are
transformed into 802.3 annex 22D clause 45-over-clause 22
mmd_phy_indirect operations that perform MII register writes to
MII_MMD_CTRL and MII_MMD_DATA. This overwrites those two MII registers,
which on this PHY are reserved and have another function, rendering the
PHY unusable while so configured.

Proper support for this PHY is restored by providing a phy_driver that
declares MMD operations as unsupported by using the helper functions
provided for that purpose, while remaining otherwise identical to
genphy_driver.

Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()")
Reported-by: Russell Senior <russell@personaltelco.net>
Closes: https://github.com/openwrt/openwrt/issues/15981
Link: https://github.com/openwrt/openwrt/issues/15739
Signed-off-by: Mark Mentovai <mark@mentovai.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/realtek.c