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: <560e7969-b859-45ed-b368-350a62cec678@lunn.ch>
Date: Sat, 12 Jul 2025 18:54:38 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
	Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Russell King <linux@...linux.org.uk>,
	Florian Fainelli <f.fainelli@...il.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Vladimir Oltean <vladimir.oltean@....com>,
	Köry Maincent <kory.maincent@...tlin.com>,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/3] net: netdevsim: Add PHY support in
 netdevsim

> +static int nsim_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
> +{
> +	return 0;
> +}
> +
> +static int nsim_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num,
> +			   u16 val)
> +{
> +	return 0;
> +}

If i'm reading the code correctly, each PHY has its own MDIO bus? And
the PHY is always at address 0?

Maybe for address != 0, these should return -ENODEV?

I'm guessing the PHY core is going to perform reads/writes for things
like EEE? And if the MAC driver has an IOCTL handler, it could also do
reads/writes. So something is needed here, but i do wounder if hard
coded 0 is going to work out O.K? Have you looked at what accesses the
core actually does?

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ