mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces
@ 2026-10-29  9:49 Coia Prant
  2026-10-29  9:56 ` netdev-bot+sinfo
  0 siblings, 1 reply; 3+ messages in thread
From: Coia Prant @ 2026-10-29  9:49 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Coia Prant, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller, Eric Dumazet, Paolo Abeni, netdev,
	linux-rockchip, linux-kernel

The RK3568 XPCS supports 1000BASE-X, SGMII and QSGMII, but the RK3568
GMAC only implements SGMII, so only SGMII is advertised in
supported_interfaces.

The generic xpcs core fills the mask from the compat table, which
includes 1000BASE-X, QSGMII and the higher-speed modes. Clearing it and
setting only SGMII keeps phylink from validating interfaces that are
not usable here.

1000BASE-X and QSGMII can be enabled later when a board actually wires
them up.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
 drivers/net/pcs/pcs-xpcs-rk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/pcs/pcs-xpcs-rk.c b/drivers/net/pcs/pcs-xpcs-rk.c
index 6f0a110e32d2..cc11a70d624f 100644
--- a/drivers/net/pcs/pcs-xpcs-rk.c
+++ b/drivers/net/pcs/pcs-xpcs-rk.c
@@ -536,6 +536,12 @@ struct dw_xpcs *xpcs_rk_create(struct device *dev, struct device_node *pcs, int
 		return xpcs;
 	}
 
+	/*
+	 * The RK3568 XPCS supports 1000BASE-X, SGMII and QSGMII.
+	 */
+	phy_interface_zero(xpcs->pcs.supported_interfaces);
+	__set_bit(PHY_INTERFACE_MODE_SGMII, xpcs->pcs.supported_interfaces);
+
 	xpcs_config_eee_mult_fact(xpcs, pxpcs->eee_mult_fact);
 	put_device(&pdev->dev);
 	return xpcs;
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces
  2026-10-29  9:49 [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces Coia Prant
@ 2026-10-29  9:56 ` netdev-bot+sinfo
  2026-10-29 10:23   ` Coia Prant
  0 siblings, 1 reply; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-10-29  9:56 UTC (permalink / raw)
  To: Coia Prant
  Cc: Jakub Kicinski, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller, Eric Dumazet, Paolo Abeni, netdev,
	linux-rockchip, linux-kernel

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by code inspection). If it was triggered please include
   the symptoms, like the stack trace or error messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces
  2026-10-29  9:56 ` netdev-bot+sinfo
@ 2026-10-29 10:23   ` Coia Prant
  0 siblings, 0 replies; 3+ messages in thread
From: Coia Prant @ 2026-10-29 10:23 UTC (permalink / raw)
  To: netdev-bot+sinfo
  Cc: Jakub Kicinski, Andrew Lunn, Heiner Kallweit, Russell King,
	David S . Miller, Eric Dumazet, Paolo Abeni, netdev,
	linux-rockchip, linux-kernel

<netdev-bot+sinfo@kernel.org> 于2026年10月29日周四 17:56写道:
>
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
>  - How the issue was discovered, e.g. hit in production, hit during
>    development, syzbot report, manual code inspection, LLM or static
>    analysis tool scan.
>
>  - Whether the issue was actually triggered, or is only theoretical
>    (e.g. found by code inspection). If it was triggered please include
>    the symptoms, like the stack trace or error messages.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.

Hi,

Thanks for the check. Replying with the missing information and a
respin that folds a related core fix into the same patch.

How the issue was discovered: this is a known gap previously flagged by
Sashiko review. xpcs_find_compat() only walks desc->compat[] and never
looks at pcs.supported_interfaces, so the mask the glue sets is written
but never consulted by the core. The same review pointed out that the
generic xpcs core fills pcs.supported_interfaces from the compat table,
which for the Synopsys ID includes 1000BASE-X, 2500BASE-X, USXGMII and
the 10G/25G modes. The RK3568 XPCS supports 1000BASE-X, SGMII and
QSGMII in hardware, but does not implement the C73 10G or 2500BASE-X
modes, and the RK3568 MAC side currently only supports SGMII.

The respin fixes both sides in one patch: the glue narrows the mask to
SGMII, and the core respects it in xpcs_find_compat().

Whether it was actually triggered: no, this is theoretical. The
affected Rockchip platform is not present in any released kernel, and
the MAC side forces the phy mode, so phylink start passes the mode
explicitly and does not normally pass an interface outside the mask.
The patch makes the mask the single source of truth for both the core
and the glue.

pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-29 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29  9:49 [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces Coia Prant
2026-10-29  9:56 ` netdev-bot+sinfo
2026-10-29 10:23   ` Coia Prant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®