Re: [PATCH net-next 1/3] net: phy: dp83867: Add SQI support

From: Andrew Lunn
Date: Thu Jun 13 2024 - 13:14:01 EST


On Thu, Jun 13, 2024 at 04:51:51PM +0200, João Rodrigues wrote:
> Don't report SQI values for 10 ethernet, since the datasheet
> says MSE values are only valid for 100/1000 ethernet

The commit message could be better. Something like:

Don't report the SQI value when the link speed is 10Mbps, since the
datasheet says MSE values are only valid for 100/1000 links.

> +static int dp83867_get_sqi(struct phy_device *phydev)
> +{
> + u16 mse_val;
> + int sqi;
> + int ret;
> +
> + if (phydev->speed == SPEED_10)
> + return -EOPNOTSUPP;

What does the datasheet say about MSE where there is no link at all?
Maybe you need to expand this test to include SPEED_UNKNOWN?

Andrew

---
pw-bot: cr