[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <188d01dbe0e2$a6f73090$f4e591b0$@gmx.de>
Date: Thu, 19 Jun 2025 08:23:08 +0200
From: <markus.stockhausen@....de>
To: "'Chris Packham'" <Chris.Packham@...iedtelesis.co.nz>
Cc: <hkallweit1@...il.com>,
<linux@...linux.org.uk>,
<davem@...emloft.net>,
<edumazet@...gle.com>,
<kuba@...nel.org>,
<pabeni@...hat.com>,
<michael@...sekall.de>,
<daniel@...rotopia.org>,
<netdev@...r.kernel.org>,
"'Andrew Lunn'" <andrew@...n.ch>
Subject: AW: AW: [PATCH] net: phy: realtek: convert RTL8226-CG to c45 only
Hi,
> Von: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
> Gesendet: Donnerstag, 19. Juni 2025 04:48
>
> So I did another check. If I clear INTF_SEL bits in SMI_GLB_CTRL the
> switch will not detect the link status correctly. C45 MDIO access from
> the kernel seems to work regardless.
>
> This is using the Realtek u-boot to do some HW init and my as yet
> unpublished switchdev driver for the RTL9300. Something somewhere needs
> to configure SMI_GLB_CTRL so the switch will get the port link status
> correctly. It doesn't have to be the mdio driver, if I remove that code
> completely everything still works (it's using the SMI_GLB_CTRL value
> that has been put there by Realtek's U-Boot).
Thanks for the test. This fits some of my observations but has other
dependencies on polling. Some c45 registers are still blocked. To find
a perfect solution that switches polling off/on and toggles the bus
c22/c45 on demand will need a lot of testing.
See also notes from my recent addition:
https://github.com/openwrt/openwrt/blob/c9e934ffd87774a64fa0c8a2af92373ef1d0894f/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c#L1172
To sum it up. On those devices it is only safe to stay in a single
clause access. Converting the RTL8226 from the current mixed
mode access should be hopefully ok.
Markus
Powered by blists - more mailing lists