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: <aFl5GJqBDeoK4fTd@shell.armlinux.org.uk>
Date: Mon, 23 Jun 2025 16:56:08 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Kamil Horák - 2N <kamilh@...s.com>
Cc: florian.fainelli@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
	andrew@...n.ch, hkallweit1@...il.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	krzk+dt@...nel.org, conor+dt@...nel.org, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	robh@...nel.org
Subject: Re: [PATCH net-next v2 1/3] net: phy: bcm54811: Fix the PHY
 initialization

On Mon, Jun 23, 2025 at 05:10:47PM +0200, Kamil Horák - 2N wrote:
>  	/* With BCM54811, BroadR-Reach implies no autoneg */
> -	if (priv->brr_mode)
> +	if (priv->brr_mode) {
>  		phydev->autoneg = 0;

This, to me, looks extremely buggy. Setting phydev->autoneg to zero does
not prevent userspace enabling autoneg later. It also doesn't report to
userspace that autoneg is disabled. Not your problem, but a latent bug
in this driver.

> +		/* Disable Long Distance Signaling, the BRR mode autoneg */
> +		err = phy_modify(phydev, MII_BCM54XX_LRECR, LRECR_LDSEN, 0);
> +		if (err < 0)
> +			return err;
> +	}
>  
> -	return bcm5481x_set_brrmode(phydev, priv->brr_mode);
> +	if (!phy_interface_is_rgmii(phydev) ||
> +	    phydev->interface == PHY_INTERFACE_MODE_MII) {

Not sure this condition actually reflects what you're trying to
achieve, because if we're using PHY_INTERFACE_MODE_MII, then
!phy_interface_is_rgmii(phydev) will be true because phydev->interface
isn't one of the RGMII modes. So, I think this can be reduced to simply

	if (!phy_interface_is_rgmii(phydev)) {

> +		/* Misc Control: GMII/MII Mode (not RGMII) */
> +		err = bcm54xx_auxctl_write(phydev,
> +					   MII_BCM54XX_AUXCTL_SHDWSEL_MISC,
> +					   MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN |
> +					   MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD
> +		);

I don't think this addition is described in the commit message.

-- 
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