linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	richardcochran@gmail.com, o.rempel@pengutronix.de,
	alok.a.tiwari@oracle.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 4/4] net: phy: micrel: Add support for lan8842
Date: Thu, 14 Aug 2025 10:20:55 +0100	[thread overview]
Message-ID: <aJ2qd9SkUPg5tmYL@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250814082624.696952-5-horatiu.vultur@microchip.com>

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!

  reply	other threads:[~2025-08-14  9:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14  8:26 [PATCH net-next v4 0/4] net: phy: micrel: Add support for lan8842 Horatiu Vultur
2025-08-14  8:26 ` [PATCH net-next v4 1/4] net: phy: micrel: Start using PHY_ID_MATCH_MODEL Horatiu Vultur
2025-08-14  9:27   ` Russell King (Oracle)
2025-08-14  9:48     ` Horatiu Vultur
2025-08-14  8:26 ` [PATCH net-next v4 2/4] net: phy: micrel: Introduce lanphy_modify_page_reg Horatiu Vultur
2025-08-14  9:22   ` Russell King (Oracle)
2025-08-14  8:26 ` [PATCH net-next v4 3/4] net: phy: micrel: Replace hardcoded pages with defines Horatiu Vultur
2025-08-14  9:23   ` Russell King (Oracle)
2025-08-14  8:26 ` [PATCH net-next v4 4/4] net: phy: micrel: Add support for lan8842 Horatiu Vultur
2025-08-14  9:20   ` Russell King (Oracle) [this message]
2025-08-14  9:55     ` Horatiu Vultur

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=aJ2qd9SkUPg5tmYL@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).