From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Kamil Horák - 2N" <kamilh@axis.com>
Cc: florian.fainelli@broadcom.com,
bcm-kernel-feedback-list@broadcom.com, andrew@lunn.ch,
hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, krzk+dt@kernel.org,
conor+dt@kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
robh@kernel.org
Subject: Re: [PATCH net-next v2 1/3] net: phy: bcm54811: Fix the PHY initialization
Date: Mon, 23 Jun 2025 16:56:08 +0100 [thread overview]
Message-ID: <aFl5GJqBDeoK4fTd@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250623151048.2391730-3-kamilh@axis.com>
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!
next prev parent reply other threads:[~2025-06-23 15:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 15:10 [PATCH net-next v2 0/3] net: phy: bcm54811: Fix the PHY initialization Kamil Horák - 2N
2025-06-23 15:10 ` [PATCH net-next v2 2/3] net: phy: bcm5481x: Implement MII-Lite mode Kamil Horák - 2N
2025-06-23 15:51 ` Maxime Chevallier
2025-06-23 17:55 ` Andrew Lunn
2025-06-23 18:18 ` Russell King (Oracle)
2025-06-24 7:59 ` Kamil Horák (2N)
2025-06-23 15:58 ` Russell King (Oracle)
2025-06-23 18:08 ` Andrew Lunn
2025-06-23 15:10 ` [PATCH net-next v2 1/3] net: phy: bcm54811: Fix the PHY initialization Kamil Horák - 2N
2025-06-23 15:56 ` Russell King (Oracle) [this message]
2025-06-24 11:43 ` Kamil Horák (2N)
2025-06-23 15:10 ` [PATCH net-next v2 3/3] dt-bindings: ethernet-phy: add optional mii-lite-mode flag Kamil Horák - 2N
2025-06-23 15:59 ` Russell King (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aFl5GJqBDeoK4fTd@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kamilh@axis.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.