netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Cc: piergiorgio.beruto@gmail.com, andrew@lunn.ch,
	hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 1/2] net: phy: phy-c45: add SQI and SQI+ support for OATC14 10Base-T1S PHYs
Date: Tue, 2 Dec 2025 16:21:40 +0000	[thread overview]
Message-ID: <aS8SFIN_LZsoyAKW@horms.kernel.org> (raw)
In-Reply-To: <20251201032346.6699-2-parthiban.veerasooran@microchip.com>

On Mon, Dec 01, 2025 at 08:53:45AM +0530, Parthiban Veerasooran wrote:

...

> +int genphy_c45_oatc14_get_sqi_max(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	if (!phydev->oatc14_sqi_capability.updated) {
> +		ret = oatc14_update_sqi_capability(phydev);
> +		if (ret)
> +			return ret;
> +	}

Hi Parthiban,

I think the check for phydev->oatc14_sqi_capability.updated can be folded
into oatc14_update_sqi_capability(), avoiding duplicating it here and in
genphy_c45_oatc14_get_sqi().

If you agree, could you consider posting a follow-up once net-next has
re-opened?

> +
> +	return phydev->oatc14_sqi_capability.sqi_max;
> +}
> +EXPORT_SYMBOL(genphy_c45_oatc14_get_sqi_max);
> +
> +/**
> + * genphy_c45_oatc14_get_sqi - Get Signal Quality Indicator (SQI) from an OATC14
> + *			       10Base-T1S PHY
> + * @phydev: pointer to the PHY device structure
> + *
> + * This function reads the SQI+ or SQI value from an OATC14-compatible
> + * 10Base-T1S PHY. If SQI+ capability is supported, the function returns the
> + * extended SQI+ value; otherwise, it returns the basic SQI value. The SQI
> + * capability is updated on first invocation if it has not already been updated.
> + *
> + * Return:
> + * * SQI/SQI+ value on success
> + * * Negative errno on read failure
> + */
> +int genphy_c45_oatc14_get_sqi(struct phy_device *phydev)
> +{
> +	u8 shift;
> +	int ret;
> +
> +	if (!phydev->oatc14_sqi_capability.updated) {
> +		ret = oatc14_update_sqi_capability(phydev);
> +		if (ret)
> +			return ret;
> +	}

  parent reply	other threads:[~2025-12-02 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01  3:23 [PATCH net-next v4 0/2] Add SQI and SQI+ support for OATC14 10Base-T1S PHYs and Microchip T1S driver Parthiban Veerasooran
2025-12-01  3:23 ` [PATCH net-next v4 1/2] net: phy: phy-c45: add SQI and SQI+ support for OATC14 10Base-T1S PHYs Parthiban Veerasooran
2025-12-01 13:24   ` Andrew Lunn
2025-12-02 16:21   ` Simon Horman [this message]
2025-12-03  8:22     ` Parthiban.Veerasooran
2025-12-01  3:23 ` [PATCH net-next v4 2/2] net: phy: microchip_t1s: add SQI support for LAN867x Rev.D0 PHYs Parthiban Veerasooran
2025-12-01 13:25   ` Andrew Lunn
2025-12-01 23:10 ` [PATCH net-next v4 0/2] Add SQI and SQI+ support for OATC14 10Base-T1S PHYs and Microchip T1S driver patchwork-bot+netdevbpf

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=aS8SFIN_LZsoyAKW@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parthiban.veerasooran@microchip.com \
    --cc=piergiorgio.beruto@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).