From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev-maintainers <edumazet@google.com>,
kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net,
netdev <netdev@vger.kernel.org>,
stable@vger.kernel.org,
Tim Menninger <tmenninger@purestorage.com>
Subject: Re: [PATCH net v1] net: dsa: mv88e6xxx: Make unsupported C45 reads return 0xffff
Date: Mon, 22 Jan 2024 14:24:57 +0200 [thread overview]
Message-ID: <20240122122457.jt6xgvbiffhmmksr@skbuf> (raw)
In-Reply-To: <20240120192125.1340857-1-andrew@lunn.ch>
Hi Andrew,
On Sat, Jan 20, 2024 at 08:21:25PM +0100, Andrew Lunn wrote:
> When there is no device on the bus for a given address, the pull up
> resistor on the data line results in the read returning 0xffff. The
> phylib core code understands this when scanning for devices on the
> bus, and a number of MDIO bus masters make use of this as a way to
> indicate they cannot perform the read.
>
> Make us of this as a minimal fix for stable where the mv88e6xxx
s/us/use/
Also, what is the "proper" fix if this is the minimal one for stable?
> returns EOPNOTSUPP when the hardware does not support C45, but phylib
> interprets this as a fatal error, which it should not be.
I think the commit message is a bit backwards, it starts with an
explanation of the solution without ever clarifying exactly what is
the problem.
At least it could have referenced the old thread which explains that:
https://lore.kernel.org/netdev/CAO-L_44YVi0HDk4gC9QijMZrYNGoKtfH7qsXOwtDwM4VrFRDHw@mail.gmail.com/
>
> Cc: stable@vger.kernel.org
> Reported-by: Tim Menninger <tmenninger@purestorage.com>
> Fixes: 1a136ca2e089 ("net: mdio: scan bus based on bus capabilities for C22 and C45")
> Fixes: da099a7fb13d ("net: phy: Remove probe_capabilities")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 383b3c4d6f59..614cabb5c1b0 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -3659,7 +3659,7 @@ static int mv88e6xxx_mdio_read_c45(struct mii_bus *bus, int phy, int devad,
> int err;
>
> if (!chip->info->ops->phy_read_c45)
> - return -EOPNOTSUPP;
> + return 0xffff;
>
> mv88e6xxx_reg_lock(chip);
> err = chip->info->ops->phy_read_c45(chip, bus, phy, devad, reg, &val);
> --
> 2.43.0
>
Is this an RFC pending testing from Tim? Or have you reproduced the
problem and confirmed that this fixes it? It's not clear how the old
thread ended.
next prev parent reply other threads:[~2024-01-22 12:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 19:21 [PATCH net v1] net: dsa: mv88e6xxx: Make unsupported C45 reads return 0xffff Andrew Lunn
2024-01-22 12:24 ` Vladimir Oltean [this message]
2024-01-22 12:29 ` Vladimir Oltean
2024-01-22 12:52 ` Vladimir Oltean
2024-01-22 13:39 ` Andrew Lunn
2024-01-22 20:44 ` Tim Menninger
2024-01-22 23:01 ` Andrew Lunn
2024-01-23 15:27 ` Tim Menninger
2024-01-23 22:59 ` Andrew Lunn
2024-01-24 15:59 ` Tim Menninger
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=20240122122457.jt6xgvbiffhmmksr@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tmenninger@purestorage.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).