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: <aJ2qd9SkUPg5tmYL@shell.armlinux.org.uk>
Date: Thu, 14 Aug 2025 10:20:55 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	richardcochran@...il.com, o.rempel@...gutronix.de,
	alok.a.tiwari@...cle.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 4/4] net: phy: micrel: Add support for lan8842

On Thu, Aug 14, 2025 at 10:26:24AM +0200, Horatiu Vultur wrote:
> +static int lan8842_config_init(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	/* Reset the PHY */
> +	ret = lanphy_modify_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> +				     LAN8814_QSGMII_SOFT_RESET,
> +				     LAN8814_QSGMII_SOFT_RESET_BIT,
> +				     LAN8814_QSGMII_SOFT_RESET_BIT);
> +	if (ret < 0)
> +		return ret;
> +
> +	/* Disable ANEG with QSGMII PCS Host side
> +	 * It has the same address as lan8814
> +	 */
> +	ret = lanphy_modify_page_reg(phydev, LAN8814_PAGE_PORT_REGS,
> +				     LAN8814_QSGMII_PCS1G_ANEG_CONFIG,
> +				     LAN8814_QSGMII_PCS1G_ANEG_CONFIG_ANEG_ENA,
> +				     0);
> +	if (ret < 0)
> +		return ret;

Could you explain exactly what effect this has please?

> +
> +	/* Disable also the SGMII_AUTO_ANEG_ENA, this will determine what is the
> +	 * PHY autoneg with the other end and then will update the host side
> +	 */
> +	ret = lanphy_write_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> +				    LAN8842_SGMII_AUTO_ANEG_ENA, 0);
> +	if (ret < 0)
> +		return ret;

Also please explain this a bit more.

If this changes whether host-side "negotiation" is used, then please
consider implementing the two phy driver inbnad operations as well.

> +static u64 lan8842_get_stat(struct phy_device *phydev, int count, int *regs)
> +{
> +	int val;
i> +	u64 ret = 0;

Please remember... reverse Christmas tree for variable declarations.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ