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 5/6] arm64: dts: s32n79-rdb: enable NETC IEP18
Date: Wed, 18 Nov 2026 16:40:03 +0000 [thread overview]
Message-ID: <GV2PR04MB1174068076F15330D997525F1967A2@GV2PR04MB11740.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <179493091171.3136.308017869378286942@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 5/6] arm64: dts: s32n79-rdb: enable NETC
> IEP18
>
> Thank you for your contribution! Sashiko AI review found 3 potential
> issue(s) to consider.
>
> Critical: 0 * High: 0 * Medium: 2 * Low: 1
>
> 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] This patch turns on `&netc_iep18` in
> arch/arm64/boot/dts/freescale/s32n79-rdb.dts so that, per the commit...
> - [Medium] Setting `&netc_iep18` to okay makes the ENETC v4 PPM PF and
> VFs live DMA masters.
> - [Low] The new `&netc_iep18` override in
> arch/arm64/boot/dts/freescale/s32n79-rdb.dts is added after `&usdhc0`.
>
> --
>
> arm64: dts: s32n79-rdb: enable NETC IEP18
>
> This commit enables the NETC v4 ECAM bus #18 on the S32N79-RDB board.
> The
> goal is for the ENETC v4 Pseudo-MAC port (PPM) PF and VF instances to be
> probed.
>
> > diff --git a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > index 1feccd61258ef..897ba24ac03ae 100644
> > --- a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > +++ b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > @@ -68,3 +68,7 @@ &usdhc0 {
> > no-sdio;
> > status = "okay";
> > };
> > +
> > +&netc_iep18 {
>
[...]
> [Severity: Medium]
> The commit message says the bus is enabled "so that the ENETC v4 Pseudo-
> MAC port (PPM) PF and VF instances are probed". Does the PF actually probe when
> the kernel is built from the in-tree arm64 defconfig?
>
> The netc_iep18 host bridge node in s32n79.dtsi has no child nodes, so the
> ENETC PF function does not get a static of_node. For a pseudo-MAC port,
> enetc4_link_init() in drivers/net/ethernet/freescale/enetc/enetc4_pf.c then
> fails here:
>
> if (!node) {
> dev_err(dev, "Missing of_node for Pseudo-MAC port\n");
> return -ENODEV;
> }
>
> The only other way to get an of_node is of_pci_make_dev_node(). The last
> patch in the series, "PCI: Create OF node for NXP ENETC pseudo-MAC
> functions", adds it as a final fixup for 0xe101/0xe110:
>
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PHILIPS, 0xe101,
> of_pci_make_dev_node);
>
Chicken and egg problem, both the PCI patch and the pci-host-ecam DT node
for IEP 18 (netc_iep18) are needed for probing. The decision was to keep the
PCI patch as the last in the series.
> However, of_pci_make_dev_node() is only built with
> CONFIG_PCI_DYNAMIC_OF_NODES. Without it, drivers/pci/pci.h provides an
> empty inline stub.
>
> PCI_DYNAMIC_OF_NODES is a plain bool with no default, and NXP_ENETC4
> only
> selects OF_DYNAMIC. arch/arm64/configs/defconfig sets
> CONFIG_PCI_HOST_GENERIC=y, CONFIG_NXP_ENETC4=m and
> CONFIG_FSL_ENETC_VF=m, but
> it does not set CONFIG_PCI_DYNAMIC_OF_NODES.
>
> So on a default arm64 build, won't the only device behind the newly enabled
> bus fail with -ENODEV? The PF creates the VFs through SR-IOV, so the VFs
> would not appear either. This is still the case at the end of the series.
>
> Would one of these work: giving the PF a static child node in DT, adding
> CONFIG_PCI_DYNAMIC_OF_NODES=y to the arm64 defconfig, or having
> NXP_ENETC4 imply or select it?
CONFIG_PCI_DYNAMIC_OF_NODES is not a hard Kconfig dependency
because only the newly introduced S32N79 chip makes use of this feature
currently. This is intentional. So, this config will be enabled for S32N79
platforms only, for now.
Provided same reply for v2:
https://lore.kernel.org/all/GV2PR04MB117408067A4647C476FAD617596692@GV2PR04MB11740.eurprd04.prod.outlook.com/
>
> [Severity: Medium]
> With this bus enabled, the PPM PF and VFs become live DMA masters. The
> netc_iep18 node in s32n79.dtsi has:
>
> iommu-map = <0x0 &smmu 0xc0000 0x100>;
> msi-map = <0x0 &its 0xc0000 0x100>;
> dma-coherent;
>
> The smmu node it points to is disabled at the SoC level:
>
> smmu: iommu@4fc00000 {
> compatible = "arm,smmu-v3";
> ...
> status = "disabled";
>
> No board DTS under arch/arm64/boot/dts/freescale/ enables it.
> of_iommu_xlate() in drivers/iommu/of_iommu.c then ignores the mapping
> without
> any message:
>
> if (!of_device_is_available(iommu_spec->np))
> return -ENODEV;
>
> As a result, the PF and VFs fall back to dma-direct and use raw physical
> addresses for the BD rings and buffers.
>
> The SoC dtsi commit in this series says "DMA is translated by the SMMUv3
> (iommu-map)". That does not seem to hold on this board.
>
> Doesn't DMA now depend entirely on the SMMU state left by boot firmware?
> Suppose firmware left the SMMU enabled with its own stream table, or set it
> to abort unmatched streams. NETC DMA would then fault or be blocked, even
> though the netdev probes.
>
> The dma-coherent property makes Linux skip cache maintenance. That too
> relies on stream attributes configured outside of Linux.
>
> Should &smmu be enabled along with this bus? Alternatively, could the
> firmware requirement be documented (SMMU in bypass with coherent
> attributes for StreamIDs 0xc0000 and up) and the dtsi commit message
> corrected?
As already explained for v2, enabling SMMU is outside the scope of this patch set:
https://lore.kernel.org/all/GV2PR04MB11740BC1C66529A8E2B672CF096692@GV2PR04MB11740.eurprd04.prod.outlook.com/
ENETC sits behind SMMU, however the SMMU node is not ready to be enabled yet,
and this is not in the scope of current patch set.
SMMU on S32N79 needs some support patches (SoC level workarounds) before
enabling it, since SMMU is a system wide config that affects other devices too.
ENETC4 is functional with the SMMU node disabled, and I checked it with traffic tests.
next prev parent reply other threads:[~2026-11-18 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1794581338.git.claudiu.manoil@nxp.com>
2026-11-13 15:02 ` [PATCH net-next v4 1/6] net: enetc: Add pseudo-MAC support for ENETCv4 Ports via a fixed-link node Claudiu Manoil
2026-11-17 15:55 ` netdev-bot+sashiko
2026-11-18 16:11 ` Claudiu Manoil
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 [this message]
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
2026-11-18 16:49 ` Claudiu Manoil
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=GV2PR04MB1174068076F15330D997525F1967A2@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®