Re: [PATCH net-next v9] net: mdio: Add RTL9300 MDIO driver
From: Andrew Lunn
Date: Mon Mar 10 2025 - 12:28:09 EST
> Using "raw" access to the PHY and thereby bypassing the MDIO
> controller's support for hardware-assisted page access is problematic.
> The MDIO controller also polls all PHYs status in hardware and hence
> be aware of the currently selected page.
It would be simplest to just disable this hardware polling.
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c;h=4b79090696e341ed1e432a7ec5c0f7f92776f0e1;hb=HEAD#l1631
The comment says:
1639 Having the MAC link settings automatically
1640 * follow the PHY link status also happens to be the only way to control MAC port status
1641 * in a meaningful way, or at least it's the only way we fully understand, as this is
1642 * what every vendor firmware is doing.
Could you expand on this. How does phylink work on this device, where
it expects to the configuring the MAC? How does this work for a C45
PHY which is Chris's use case?
I think we first need to understand the restrictions with the MAC
configuration before we can decided how this should all work.
Andrew