From: Vladimir Oltean <olteanv@gmail.com>
To: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Fix PCS link check on CMODE read error
Date: Thu, 13 Aug 2026 21:53:12 +0300 [thread overview]
Message-ID: <20260813185312.ikljy4rqx6r2e7ci@skbuf> (raw)
In-Reply-To: <20260813153131.3952970-1-ruoyuw560@gmail.com>
On Thu, Aug 13, 2026 at 11:31:31PM +0800, Ruoyu Wang wrote:
> mv88e6352_pcs_link_check() ignores errors returned by
> port_get_cmode(). If the port status register read fails,
> mv88e6352_port_get_cmode() returns without setting cmode. The link check
> then compares an uninitialized value and may incorrectly treat the PCS
> as active.
>
> Save the return value and fail the link check after releasing the
> register lock. marvell_c22_pcs_get_state() initializes the reported link
> state to down before calling the check, so a read failure is handled
> safely until a later poll succeeds.
>
> This issue was found by a static analysis checker and confirmed by manual
> source review.
>
> Fixes: 85764555442f ("net: dsa: mv88e6xxx: convert 88e6352 to phylink_pcs")
> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
next prev parent reply other threads:[~2026-08-13 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 15:31 [PATCH net] net: dsa: mv88e6xxx: Fix PCS link check on CMODE read error Ruoyu Wang
2026-08-13 18:53 ` Vladimir Oltean [this message]
2026-08-17 23:50 ` 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=20260813185312.ikljy4rqx6r2e7ci@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ruoyuw560@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