mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Claudiu Manoil <claudiu.manoil@nxp.com>
To: "netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	dl-S32 <S32@nxp.com>, "bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>
Subject: RE: [PATCH net-next v4 1/6] net: enetc: Add pseudo-MAC support for ENETCv4 Ports via a fixed-link node
Date: Wed, 18 Nov 2026 16:11:14 +0000	[thread overview]
Message-ID: <GV2PR04MB117402979BA16A472F0C0B1A2967A2@GV2PR04MB11740.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <179493090971.3136.9721533094333369940@kernel.org>

From: netdev-bot+sashiko@kernel.org <netdev-bot+sashiko@kernel.org>
Sent: Tuesday, November 17, 2026 5:55 PM
> To: Claudiu Manoil <claudiu.manoil@nxp.com>
> Cc: netdev@vger.kernel.org; dl-S32 <S32@nxp.com>; bhelgaas@google.com;
> linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; kuba@kernel.org
> Subject: Re: [PATCH net-next v4 1/6] net: enetc: Add pseudo-MAC support for
> ENETCv4 Ports via a fixed-link node
> 
> Thank you for your contribution! Sashiko AI review found 3 potential
> issue(s) to consider.
> 
> Critical: 0 * High: 0 * Medium: 1 * Low: 2
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
> 
> - [Medium] In enetc4_link_init()
>   (drivers/net/ethernet/freescale/enetc/enetc4_pf.c:1025-1047), the...
> - [Low] In drivers/net/ethernet/freescale/enetc/enetc4_pf.c,
>   enetc4_link_init() (lines 1035-1047) only builds the pseudo-MAC fixed-...
> - [Low] enetc4_add_ppm_fixed_link()
>   (drivers/net/ethernet/freescale/enetc/enetc4_pf.c:996) writes a...
> 
> --
> 
> net: enetc: Add pseudo-MAC support for ENETCv4 Ports via a fixed-link node
> 
> This lets ENETCv4 pseudo-MAC ports probe without a static DT "ethernet"
> node. At probe time an of_changeset adds a "fixed-link" child node whose
> speed is read from PCR[PSPEED]. The pseudo-MAC path runs when the port
> has
> no OF node or only an OF_DYNAMIC node, and the changeset is reverted on
> teardown and on the probe error unwind.
> 
> > diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
> b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
> > index 71c971618388b..b7e7201e6a71a 100644
> > --- a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
> > +++ b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
> 

[ ... ]

> [Severity: Medium]
> Is the OF_DYNAMIC flag enough to show that the node has no link
> description?
> 
> __of_node_dup() sets OF_DYNAMIC, and DT overlays create their nodes with
> it in add_changeset_node(). An overlay can also be applied on top of the
> node from of_pci_make_dev_node() to add phy-mode or fixed-link.
> 
> In either case, this branch:
> 
> - skips of_get_phy_mode()
> - forces PHY_INTERFACE_MODE_INTERNAL
> - calls enetc4_add_ppm_fixed_link(), which calls
>   of_changeset_create_node(ocs, np, "fixed-link") without checking for an
>   existing fixed-link child
> 
> __of_attach_node() puts the new node at the head of the child list:
> 
>     np->sibling = np->parent->child;
>     np->parent->child = np;
> 
> phylink_parse_fixedlink() looks the node up with
> fwnode_get_named_child_node(), so it would find the driver-synthesized
> fixed-link before the DT one.
> 
> Would that leave two fixed-link children and replace the DT-provided speed
> with the PCR[PSPEED] value?
> 
> The commit message says:
> 
>     The pseudo-MAC path is selected when the port has no OF node, or when it
>     only has the empty PCI-synthesized node (OF_DYNAMIC), which carries no
>     fixed-link description.
> 
> Nothing in the code checks that, though. Would a check such as
> of_get_child_by_name(node, "fixed-link") or
> of_property_present(node, "phy-mode") make the code match the
> description?
> 

Same point was made on v2, and the reply is the same [1].

This is a theoretical case, the Pseudo-MAC ports will not have overlays
on top. It's either static DT node (fully specified), or a clean PCI-synthetized
node. Any other configuration for the Pseudo-MAC node (like the one implied
above) is not valid.

[1] https://lore.kernel.org/all/GV2PR04MB1174015C406D353895C57476696692@GV2PR04MB11740.eurprd04.prod.outlook.com/

  reply	other threads:[~2026-11-18 16:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1794581338.git.claudiu.manoil@nxp.com>
2026-11-13 15:02 ` Claudiu Manoil
2026-11-17 15:55   ` netdev-bot+sashiko
2026-11-18 16:11     ` Claudiu Manoil [this message]
2026-11-13 15:02 ` [PATCH net-next v4 2/6] net: enetc: Allocate int_vector array dynamically Claudiu Manoil
2026-11-13 15:02 ` [PATCH net-next v4 3/6] net: enetc: Enable probing of version 4.4 devices Claudiu Manoil
2026-11-17 15:55   ` netdev-bot+sashiko
2026-11-18 15:43     ` Claudiu Manoil
2026-11-13 15:02 ` [PATCH net-next v4 4/6] arm64: dts: s32n79: add NETC IEP18 ECAM node for ENETC PPM ports Claudiu Manoil
2026-11-13 15:02 ` [PATCH net-next v4 5/6] arm64: dts: s32n79-rdb: enable NETC IEP18 Claudiu Manoil
2026-11-17 15:55   ` netdev-bot+sashiko
2026-11-18 16:40     ` Claudiu Manoil
2026-11-13 15:02 ` [PATCH net-next v4 6/6] PCI: Create OF node for NXP ENETC pseudo-MAC functions Claudiu Manoil
2026-11-17 15:55   ` netdev-bot+sashiko

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=GV2PR04MB117402979BA16A472F0C0B1A2967A2@GV2PR04MB11740.eurprd04.prod.outlook.com \
    --to=claudiu.manoil@nxp.com \
    --cc=S32@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®