Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: claudiu.manoil@nxp.com
Cc: netdev@vger.kernel.org, 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
Date: Tue, 17 Nov 2026 15:55:11 +0000	[thread overview]
Message-ID: <179493091171.3136.308017869378286942@kernel.org> (raw)
In-Reply-To: <6f1ea6caef6ca01c9a6384cd1024384d31848c53.1794581338.git.claudiu.manoil@nxp.com>

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: Low]
This isn't a bug, but Documentation/devicetree/bindings/dts-coding-style.rst
says:

  When extending nodes in the board DTS via &label, the entries shall be
  ordered either alpha-numerically or by keeping the order from DTSI,

The existing overrides in this file are in alphabetical order (irqsteer_coss,
uart0, uart5, uart6, uart7, usdhc0). Should &netc_iep18 go between
&irqsteer_coss and &uart0? Keeping the DTSI order would also put it before
&usdhc0.

> +	status = "okay";
> +};

[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);

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?

[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?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794581338.git.claudiu.manoil%40nxp.com

  reply	other threads:[~2026-11-17 15:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 15:02 [PATCH net-next v4 0/6] net: enetc: S32N79 pseudo-MAC (PPM) networking support Claudiu Manoil
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
     [not found]   ` <sashiko-outbox-214685@kernel.org>
2026-11-17  9:08     ` Claudiu Manoil
2026-11-17 15:55   ` netdev-bot+sashiko
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-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 [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

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=179493091171.3136.308017869378286942@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=s32@nxp.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