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] [day] [month] [year] [list]
Message-ID: <478cf6c2-8461-46f8-bcde-d89032c35d63@lunn.ch>
Date: Thu, 13 Mar 2025 14:05:46 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
Cc: Daniel Golle <daniel@...rotopia.org>,
	"hkallweit1@...il.com" <hkallweit1@...il.com>,
	"linux@...linux.org.uk" <linux@...linux.org.uk>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>,
	"kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>,
	"sander@...nheule.net" <sander@...nheule.net>,
	"markus.stockhausen@....de" <markus.stockhausen@....de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v9] net: mdio: Add RTL9300 MDIO driver

> Ah I get it. It's about tracking the current page for a particular 
> device address and using that instead of 0xfff in 
> FIELD_PREP(PHY_CTRL_MAIN_PAGE, 0xfff). I'm not sure it's going to work 
> generically. Realtek switches know about Realtek PHYs but I've seen 
> plenty of other PHYs that do paging via addresses other than 0x1f 
> (Marvell 88E1111 for example uses 0x1d for its extaddr, some Broadcom 
> PHYs seem to use 0x1c). I'm not sure how many systems are mixing vendors 
> for C22 PHYs (the Zyxel boards seem to have Marvell AQR 10G PHYs but 
> that's C45).

It is worse than that. The switch needs to change the page itself:

static int rtlgen_read_status(struct phy_device *phydev)
{
        int ret, val;

        ret = genphy_read_status(phydev);
        if (ret < 0)
                return ret;

        if (!phydev->link)
                return 0;

        val = phy_read_paged(phydev, 0xa43, 0x12);
        if (val < 0)
                return val;

        rtlgen_decode_physr(phydev, val);

It needs to read register 0x12 from page 0xa43.

I do agree this cannot work in the general case. Which is why i asked
about what the limitations are for configuring the MAC in software.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ