From: sashiko-bot@kernel.org
To: "Frieder Schrempf" <frieder@fris.de>
Cc: imx@lists.linux.dev, devicetree@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH net-next 3/4] net: enetc: add i.MX952 ENETC support
Date: Thu, 19 Nov 2026 10:38:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-222969@kernel.org> (raw)
In-Reply-To: <20261118-imx952-enetc-v1-3-25721440602e@kontron.de>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: enetc: wrong PCI bus lookup in
enetc_get_phc_index_by_pdev() on i.MX952
--
commit 9488db0afb3e3295b4063b2f78e46b5195953993
Author: Wei Fang <wei.fang@nxp.com>
net: enetc: add i.MX952 ENETC support
This commit adds driver data with a 133 MHz sysclk frequency and PHC PCI
lookup support for i.MX952 ENETC (revision 4.6) PF and VF devices.
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
> index 7965dfd06f5f6..3c6c6fc0ab8cf 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
> @@ -1149,6 +1149,7 @@ static int enetc_get_phc_index_by_pdev(struct enetc_si *si)
> devfn = PCI_DEVFN(24, 0);
> break;
> case ENETC_REV_4_3:
> + case ENETC_REV_4_6:
> devfn = PCI_DEVFN(0, 1);
> break;
> default:
[Severity: Medium]
Does enetc_get_phc_index_by_pdev() look up the PTP timer on the wrong PCI
bus for i.MX952 ENETC1 and its VFs?
On i.MX952, ENETC0 is on bus 0 whereas ENETC1 is on bus 1:
drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c:
#define IMX952_ENETC0_BUS_DEVFN 0x0
#define IMX952_ENETC1_BUS_DEVFN 0x100
Unlike i.MX94 (ENETC_REV_4_3), which provides a timer endpoint on each
bus, i.MX952 only has a single NETC 1588 timer on bus 0 at PCI_DEVFN(0, 1).
Because enetc_get_phc_index_by_pdev() queries si->pdev->bus via
pci_get_domain_bus_and_slot(), calling it for ENETC1 (on VFs where of_node
is NULL, or on PF when the optional ptp-timer phandle is absent) searches
bus 1, fails to find the timer, and causes enetc_get_ts_info() to fall back
to software timestamping.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118-imx952-enetc-v1-0-25721440602e@kontron.de?part=3
next prev parent reply other threads:[~2026-11-19 10:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 10:37 [PATCH net-next 0/4] net: enetc: Add i.MX952 support Frieder Schrempf
2026-11-18 10:37 ` [PATCH net-next 1/4] dt-bindings: net: nxp,netc-blk-ctrl: add i.MX952 compatible Frieder Schrempf
2026-11-18 17:43 ` Conor Dooley
2026-11-18 10:37 ` [PATCH net-next 2/4] net: enetc: netc_blk_ctrl: add i.MX952 support Frieder Schrempf
2026-11-18 13:51 ` Andrew Lunn
2026-11-18 10:37 ` [PATCH net-next 3/4] net: enetc: add i.MX952 ENETC support Frieder Schrempf
2026-11-19 10:38 ` sashiko-bot [this message]
2026-11-18 10:37 ` [PATCH net-next 4/4] ptp: netc: use 133 MHz system clock on i.MX952 Frieder Schrempf
2026-11-19 10:38 ` sashiko-bot
2026-11-18 10:43 ` [PATCH net-next 0/4] net: enetc: Add i.MX952 support Clark Wang
2026-11-18 10:50 ` Frieder Schrempf
-- strict thread matches above, loose matches on Subject: below --
2026-11-04 9:22 [PATCH net-next 0/4] net: enetc: add i.MX952 NETC v4.6 support xiaoning.wang
2026-11-04 9:22 ` [PATCH net-next 3/4] net: enetc: add i.MX952 ENETC support xiaoning.wang
2026-11-05 9:27 ` sashiko-bot
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=sashiko-outbox-222969@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frieder@fris.de \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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