lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <059901dc0209$a817de50$f8479af0$@gmx.de>
Date: Thu, 31 Jul 2025 12:55:40 +0200
From: <markus.stockhausen@....de>
To: "'Heiner Kallweit'" <hkallweit1@...il.com>,
	<andrew@...n.ch>,
	<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>,
	<jan@....eu>
Subject: AW: [PATCH v2] net: phy: realtek: convert RTL8226-CG to c45 only

Hi Heiner,

> Von: Heiner Kallweit <hkallweit1@...il.com> 
> Gesendet: Donnerstag, 31. Juli 2025 12:25
>
> On 31.07.2025 07:44, Markus Stockhausen wrote:
> > The RTL8226-CG can be found on devices like the Zyxel XGS1210-12. 
> > These are driven by a Realtek RTL9302B SoC that has phy hardware 
> > polling in the background. One must decide if a port is polled via c22 or c45.
> > Additionally the hardware disables MMD access in c22 mode. For 
> > reference
>
> For my understanding: Which hardware disables c22 MMD access on RTL8226 how?
> RTL930x configures RTL8226 in a way that is doesn't accept c45 over c22 any longer?

sorry to be not clear about this. We have rtl9300 mdio driver
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree
/drivers/net/mdio/mdio-realtek-rtl9300.c?h=v6.16

This must decide how its four smi busses are configured. Either c22 
or c45. https://svanheule.net/realtek/longan/register/smi_glb_ctrl 
So it does.

	/* Put the interfaces into C45 mode if required */
	glb_ctrl_mask = GENMASK(19, 16);
	for (i = 0; i < MAX_SMI_BUSSES; i++)
		if (priv->smi_bus_is_c45[i])
			glb_ctrl_val |= GLB_CTRL_INTF_SEL(i);
	...
	err = regmap_update_bits(regmap, SMI_GLB_CTRL,
				 glb_ctrl_mask, glb_ctrl_val);

As soon as this bit is set to one mode the bus will block most
accesses with the other mode. E.g. In c22 mode registers 13/14
are a dead end. So the only option for the bus is to limit access
like this.

	bus->name = "Realtek Switch MDIO Bus";
	if (priv->smi_bus_is_c45[mdio_bus]) {
		bus->read_c45 = rtl9300_mdio_read_c45;
		bus->write_c45 =  rtl9300_mdio_write_c45;
	} else {
		bus->read = rtl9300_mdio_read_c22;
		bus->write = rtl9300_mdio_write_c22;
	}

Markus


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ