Article View: linux.kernel.netdev
Article #17959Re: [PATCH net-next v4 3/6] net: enetc: Enable probing of version 4.4 devices
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 15:55
Date: Tue, 17 Nov 2026 15:55
147 lines
12854 bytes
12854 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 0
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 adds ENETC_REV_4_4 entries to enetc_info[] so that
S32N79 PFs (0xe101/0xe110) and VFs (0xef00) now probe.
- [Medium] When an ENETC v4 VF cannot get the IP minor revision from its
PF over the VSI-PSI mailbox, enetc_vf_get_revision()…
--
net: enetc: Enable probing of version 4.4 devices
This commit adds driver data and platform info entries for the ENETC v4.4
PF and VF devices on S32N79 SoCs. These run with a 500 MHz system clock.
The PFs use the 0xe101 or 0xe110 device ID and the VFs use 0xef00.
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
> index 855b2d3b87182..e3aa117d323d5 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc.c
> @@ -3840,6 +3840,20 @@ static const struct enetc_drvdata enetc4_vf_data = {
[ ... ]
> +static const struct enetc_drvdata enetc4_s32n79_vf_data = {
> + .sysclk_freq = ENETC_CLK_500M,
> + .tx_csum = true,
> + .max_frags = ENETC4_MAX_SKB_FRAGS,
> + .eth_ops = &enetc_vf_ethtool_ops,
> +};
[Severity: Medium]
Can an S32N79 VF end up with the 333 MHz drvdata instead of this one?
The VF gets its minor revision from the PF over the VSI-PSI mailbox. If
that query fails, enetc_vf_get_revision() falls back to 4.1:
drivers/net/ethernet/freescale/enetc/enetc_vf.c:enetc_vf_get_revision() {
...
ip_mn = enetc_vf_get_ip_minor_revision(si);
if (ip_mn >= 0) {
si->revision = (si->pdev->revision << 8) | ip_mn;
return;
}
si->revision = ENETC_REV_4_1;
...
}
The query can fail in several ways:
- -EIO when the mailbox is busy
- -ETIMEDOUT after the 200 ms poll
- an error status returned by the PSI
- -ENOMEM from dma_alloc_coherent()
S32N79 VFs use the same 0xef00 device ID. So in that case
enetc_get_driver_data() matches {ENETC_REV_4_1, NXP_ENETC_VF_DEV_ID} and
selects enetc4_vf_data, which uses ENETC_CLK_333M. enetc_vf_netdev_setup()
then copies that value into priv->sysclk_freq.
Before this patch every v4 platform ran at 333 MHz, so the fallback made no
difference. On a 500 MHz platform, wouldn't enetc_usecs_to_cycles() program
the default 600 us tx_ictt, the DIM rx_ictt and the set_coalesce values at
roughly 0.67x the requested timeout?
enetc_get_coalesce() converts back with the same clock. So ethtool -c would
still show the requested values while the hardware fires about 1.5x sooner.
Should the fallback change now that v4 platforms don't all use the same
clock frequency?
> @@ -3870,6 +3884,18 @@ static const struct enetc_platform_info enetc_info[] = {
> .dev_id = NXP_ENETC_VF_DEV_ID,
> .data = &enetc4_vf_data,
> },
> + { .revision = ENETC_REV_4_4,
> + .dev_id = NXP_ENETC_PPM_DEV_ID,
> + .data = &enetc4_s32n79_ppm_data,
> + },
> + { .revision = ENETC_REV_4_4,
> + .dev_id = NXP_ENETC_PF_DEV_ID,
> + .data = &enetc4_s32n79_ppm_data,
> + },
> + { .revision = ENETC_REV_4_4,
> + .dev_id = NXP_ENETC_VF_DEV_ID,
> + .data = &enetc4_s32n79_vf_data,
> + },
[Severity: Medium]
Does enetc_get_phc_index_by_pdev() in enetc_ethtool.c also need an
ENETC_REV_4_4 case? It has its own per-revision table for the timer devfn:
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c:enetc_get_phc_index_by_pdev() {
...
switch (si->revision) {
case ENETC_REV_1_0:
devfn = PCI_DEVFN(0, 4);
break;
case ENETC_REV_4_1:
devfn = PCI_DEVFN(24, 0);
break;
case ENETC_REV_4_3:
devfn = PCI_DEVFN(0, 1);
break;
default:
return -1;
}
...
}
enetc4_s32n79_vf_data uses enetc_vf_ethtool_ops, which provides
enetc_get_ts_info(). SR-IOV VFs have no OF node, so enetc_get_phc_index()
always takes the per-pdev path. For a v4.4 VF the call chain is:
enetc_get_ts_info()
enetc_get_phc_index()
enetc_get_phc_index_by_pdev()
default: return -1
enetc_get_ts_info() then jumps to timestamp_tx_sw. It reports no PHC and
only SOF_TIMESTAMPING_TX_SOFTWARE.
enetc_hwtstamp_set() and enetc_hwtstamp_get() still accept hardware
timestamping configs, because they only check
enetc_ptp_clock_is_enabled().
Would ptp4l and similar tools then fail to find a PHC on S32N79 VFs?
The v4.4 PF uses enetc4_ppm_ethtool_ops, which has no get_ts_info, so this
seems to affect only the VFs.
The code doesn't show whether a NETC timer is reachable on the VF's PCI
bus on S32N79. If PTP is intentionally left unsupported on v4.4, could the
commit message say so?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794581338.git.claudiu.manoil%40nxp.com
Technical Details
Message-ID:
<179493091076.3136.7730860553084197808@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365410-linux-kernel-netdev=dewy.ruReferences:
<d783ccebf4b38bfd1e2ede44c36682269a5bc68e.1794581338.git.claudiu.manoil@nxp.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365410-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 3/6] net: enetc: Enable probing of version 4.4 devices Date: Tue, 17 Nov 2026 15:55:10 +0000 Organization: Usenet Network Message-ID: <179493091076.3136.7730860553084197808@kernel.org> References: <d783ccebf4b38bfd1e2ede44c36682269a5bc68e.1794581338.git.claudiu.manoil@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2369216"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:e2d+MgO3KpTjR5qhl4oTdbzNI/4= sha256:+K/jCBy0PPkTghkqn8zU73cdy7nLsh+2abX5e/ET7Ko= sha1:pn7Lu5C3r+n07zmd134RSk4Mnwc= sha256:X1nnTMbAwmGcTrNU7nTODf0nhOblSSaFsCyMo0jHT0A= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5C6AA114FD1; Tue, 17 Nov 2026 18:55:35 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id odaIIwg4hmfa; Tue, 17 Nov 2026 18:55:30 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-365410-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3D3C1114FC3; Tue, 17 Nov 2026 18:55:22 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 2637D4214B; Tue, 17 Nov 2026 15:55:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794930912; b=p4YL3RzwEZAroiJhVo5+4C9ooBAoQbVdae3v1UofEmvuFTtiUkh4CMdMVy/Xk04Ggt2C nz/SKQ9er03kF/+SlcJOO35qpeLAMaNGZxNFLimK7RNRLVt/nG1dxtC71AxvnxnNop0WM VNtUSri0tgbBkvCi6mw1cxZnJywQqZh5y/uC5SCEqZk2soKiDfvorYyKBDMD6Pt3J3RlP r+p+CY9/EEhc0HO+OFOvr3BDnUAgagZGarIBHBA2rnJnSDJYwGhbjaYQ4i4ssj+lSki+s 2OXxel4ORfEjZ2tBrMMGV9QT4aU5vqFjk248LgHxF9YTZz8A4EwDXGx6gbEcsyUywew== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794930912; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=JjXoxd40XZCM2J7imHc+xCLCgdNEwbxkjgF0ryjpVlA=; b=Kli4KWdb7qW/P5YAbYtX4yRT8Bhb3MhWESoB+XGDytXLT++KC1KEkdw1eGWhet8/H6fP XTMTmfFUZdTTJ5wlNv62mTRF6hUlw3pxnav2ybDjCmhb8X/AhLcDkAZ28CIckR8FNPr0X e9J2V9j7PtzKPiEyBO4WUaBN12sBsdmwxMmN+wF4dIFsTvxGP2zcnkqNA9CpuccLt3a7x B5c8K4cn2LfU0ktzFG/1CYRQj7ybTHvVZePq2Ew+l4fzcNX6KPCtYXQ/EafBN1tSG+mIj DdX39aVb3hst/KynFKz1DpLLN9sze4z4+3Q8V94fOWLl2Ypmt4afCI2FgcvyLM4/PUA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aP8BaIh4; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8893E606A33D; Tue, 17 Nov 2026 15:55:12 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aP8BaIh4 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794930911; b=QAWJCA9fDoujX+TeYH8+eNf4zp/nwFimK6q8Yqqgs7Hv4WNDGDlWPcPMO/x6kdFCndtX YDdONHmmSjF5dYcocdQvk8w6lAQCreuHMrkiLImGDkhD3asLw/Uv49pGVi62e92AK+Rdt 9OyyoZzKRVD1fxk6ycjqmFqYxggOS0thm0gDUfnYrdUJ3AqOvnD4OP9zKbYGVgXEkcOsi 68qw7IjvGwin8Qs4ZE6aLBuCAh+FRdj6kJH6M7tgbMHJmceHBEhh/tYRPrakxmogqT+Y8 mXCviCNeYprrdKZp/eTkSn/irrKWZ9v2f/kQWTigi7xPdCCTEIgKFi/nP1MBTBBtA3Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794930911; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=JjXoxd40XZCM2J7imHc+xCLCgdNEwbxkjgF0ryjpVlA=; b=FyfaHAyPmxHd9atqWdIO9LVnPXXjqDOq++jY1T+aZQMPVfyi9qiwgxcEqjAxU0zA1tlV B7fsHlzVejcnEJcwclP3VMIGhSspDicafgFIyuo/W2Ylib/lVUJ8eGJvBsFKlT+3GBiTr IypQclhGLwN/jH0FA8rHVpYjYYQBDCruB1/DQA+d8beejltMbXR51mcOny269Dx4XDPVy e5fPOKtCdbGJZTQJgBsjlBVLr0KmOW+Eu5anHMNFrcDU7y5NQMphPiXXNFE8ZaHlsdD90 8xxURmAfXsAE88Sm6jGxJNSmjEhtV1Z2ySEBvBpbHmT5DPkbxeos7j/fy/AVIouHeeQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aP8BaIh4; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA026606A332; Tue, 17 Nov 2026 15:55:11 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3194B1F000C7; Tue, 17 Nov 2026 15:55:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794930911; bh=JjXoxd40XZCM2J7imHc+xCLCgdNEwbxkjgF0ryjpVlA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=aP8BaIh4sP4CnWtehw0gVhPcmNcGR4lQ4G+wP2mbhujNlC3TafX+BIajd7bAM1hXc C1J8tstlQsf99ilWORjsZ+H6yRsD+ohfcqH4fmdDAa2z1DU7s0TkMlhVi0u+Oijp7W Lw03Of3eOFxNNEN8dQE6nMiQqOFz121SCbf1P1xAH9K514S1jcYsRZ/HkOznRP72r1 CHBnwic1sgSQ4plsvNjLNRzffzgDR4QWLBAlbfRH053KABJIduTXvJKNl/x3jx1xuz UQS1E0XvBTr2TMQnneDs/XhJMlsOmFe08lzNRat7kize5kLd7vh1UKmVMPTDwn+u8Z gy/lV/oJq4xVw== X-Cc: netdev@vger.kernel.org, s32@nxp.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kuba@kernel.org X-In-Reply-To: <d783ccebf4b38bfd1e2ede44c36682269a5bc68e.1794581338.git.claudiu.manoil@nxp.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list