From: "Neeli, Srinivas" <srneeli@amd.com>
To: netdev-bot+sashiko@kernel.org, srinivas.neeli@amd.com
Cc: nagadheeraj.rottela@amd.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, richardcochran@gmail.com,
michal.simek@amd.com, bigeasy@linutronix.de,
clrkwllms@kernel.org, rostedt@goodmis.org,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rt-devel@lists.linux.dev, neelisrinivas18@gmail.com,
git@amd.com
Subject: Re: [PATCH net-next v2 2/8] net: xilinx: tsn: add TSN endpoint wrapper driver
Date: Thu, 24 Sep 2026 15:09:40 +0530 [thread overview]
Message-ID: <1e3e6064-83ec-496d-8935-637c87423f85@amd.com> (raw)
In-Reply-To: <178924536666.3125.1102910032368474240@kernel.org>
Hi,
On 9/13/2026 2:06 AM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider:
>
> Critical: 0 · High: 0 · Medium: 0 · Low: 2
>
> - [Low] Kconfig help text for CONFIG_XILINX_TSN claims the option
> "provides the wrapper device and the endpoint MAC that connects the IP…
> - [Low] The binding Documentation/devicetree/bindings/net/xlnx,tsn-
> endpoint-ethernet-mac.yaml puts 'xlnx,num-priorities' (uint32, 2..8)…
>
> --
>
> net: xilinx: tsn: add TSN endpoint wrapper driver
>
> This adds a thin wrapper platform driver for the AMD/Xilinx TSN Endpoint
> Ethernet MAC IP node. The wrapper enables the six IP-wide clocks
> described in the device tree and then populates the DT sub-nodes so each
> one can bind to its own driver.
>
> A couple of questions on the new Kconfig text and on the DT properties
> the wrapper consumes.
>
> [ ... ]
>
>> diff --git a/drivers/net/ethernet/xilinx/tsn/Kconfig b/drivers/net/ethernet/xilinx/tsn/Kconfig
>> new file mode 100644
>> index 000000000000..b8939d8a92ef
>> --- /dev/null
>> +++ b/drivers/net/ethernet/xilinx/tsn/Kconfig
>> @@ -0,0 +1,15 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>> +#
>> +# Xilinx TSN device configuration
>> +#
>> +
>> +config XILINX_TSN
>> + tristate "Xilinx TSN Ethernet driver"
>> + depends on OF_ADDRESS
>> + help
>> + This driver supports the AMD/Xilinx Time-Sensitive Networking
>> + (TSN) Endpoint Ethernet MAC IP. It provides the wrapper device
>> + and the endpoint MAC that connects the IP to the host CPU. The
>> + three-port switch is supported by the companion DSA driver.
> [Severity: Low]
> Is the help text accurate at this point in the series? It says the
> option "provides the wrapper device and the endpoint MAC that connects
> the IP to the host CPU", but the Makefile added by this patch builds only
> the wrapper object:
>
> xilinx_tsn-y := xilinx_tsn_main.o
>
> and tsn_drivers[] registers only &tsn_driver, which matches
> "xlnx,tsn-endpoint-ethernet-mac-3.0". No driver in the tree matches the
> sub-node compatibles at this commit, so devm_of_platform_populate() in
> tsn_ip_probe() creates child platform devices that cannot bind, and
> enabling the symbol here yields enabled clocks but no netdev.
>
> The endpoint MAC part is resolved by later patches in this same series:
> by the end of the series the Makefile also builds xilinx_tsn_ep.o,
> tsn_drivers[] gains &xlnx_tsn_ep_driver, and xilinx_tsn_ep.c matches
> ".compatible = \"xlnx,tsn-ep-mac\"", so this is only a transient
> mismatch between patches.
>
> The remaining sentence about the "companion DSA driver" refers to
> something that is not in-tree at any point of this series. Could that
> sentence be dropped or reworded until the DSA driver lands?
The Kconfig text describes what the option provides once the series
is applied,
and it is written once rather than edited in each patch.
xilinx_tsn_ep.o and
the endpoint driver land in the next patch of this same series, so
"the wrapper
device and the endpoint MAC" is accurate for the series as a whole.
The switch is a separate submission. V1 carried the endpoint, wrapper and
switch together, following the guidance to keep a series reviewable
we split
it, so the DSA switch driver is posted as its own series. The sentence
describes how the three-port switch is supported in the overall
design, which
is the same text V1 and V2 carried, so we are keeping it unchanged.
>> +
>> + If unsure, say N.
>> diff --git a/drivers/net/ethernet/xilinx/tsn/Makefile b/drivers/net/ethernet/xilinx/tsn/Makefile
>> new file mode 100644
>> index 000000000000..6f99226f3dc8
>> --- /dev/null
>> +++ b/drivers/net/ethernet/xilinx/tsn/Makefile
>> @@ -0,0 +1,2 @@
>> +obj-$(CONFIG_XILINX_TSN) += xilinx_tsn.o
>> +xilinx_tsn-y := xilinx_tsn_main.o
>> diff --git a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c
>> new file mode 100644
>> index 000000000000..afe7609c67fb
>> --- /dev/null
>> +++ b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c
>> @@ -0,0 +1,104 @@
> [ ... ]
>
>> +static int tsn_ip_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct xlnx_tsn_ip *w;
>> + int ret;
>> +
>> + w = devm_kzalloc(dev, sizeof(*w), GFP_KERNEL);
>> + if (!w)
>> + return -ENOMEM;
>> +
>> + for (int i = 0; i < TSN_NUM_CLOCKS; i++)
>> + w->clks[i].id = tsn_clk_names[i];
>> +
>> + ret = devm_clk_bulk_get(dev, TSN_NUM_CLOCKS, w->clks);
>> + if (ret)
>> + return dev_err_probe(dev, ret, "failed to get clocks\n");
>> +
>> + ret = clk_bulk_prepare_enable(TSN_NUM_CLOCKS, w->clks);
>> + if (ret)
>> + return dev_err_probe(dev, ret, "failed to enable clocks\n");
>> +
>> + ret = devm_add_action_or_reset(dev, tsn_clk_bulk_disable, w);
>> + if (ret)
>> + return ret;
>> +
>> + return devm_of_platform_populate(dev);
>> +}
> [Severity: Low]
> The binding
> Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
> lists xlnx,num-priorities (uint32, 2..8) in the required: list for the
> "xlnx,tsn-endpoint-ethernet-mac-3.0" node:
>
> xlnx,num-priorities:
> $ref: /schemas/types.yaml#/definitions/uint32
> minimum: 2
> maximum: 8
>
> tsn_ip_probe() is the only driver matching that compatible here, and it
> does devm_kzalloc(), devm_clk_bulk_get(), clk_bulk_prepare_enable(),
> devm_add_action_or_reset() and devm_of_platform_populate() without any
> of_property_read_u32(), so the mandatory property is neither read nor
> range-checked.
>
> A later patch in this series ("net: xilinx: tsn: parse endpoint DMA
> channel configuration") does consume it from the parent IP node in
> xlnx_tsn_ep_probe():
>
> ret = of_property_read_u32(ip_np, "xlnx,num-priorities", &num_prio);
> ...
> if (num_tx != num_prio)
> return dev_err_probe(dev, -EINVAL, ...);
>
> so the binding/driver mismatch only exists between patches of this
> series. Was leaving the property unconsumed by the wrapper itself
> intentional?
Yes, that is intentional. The wrapper driver only enables the IP-wide
clocks
and populates the DT sub-nodes. It does not implement a data path, so
it has no
use for the priority queue count. xlnx,num-priorities describes the
IP and is
consumed by the endpoint MAC driver, which reads it from the parent
IP node in
xlnx_tsn_ep_probe(). Keeping the property on the IP node and reading
it from
the child that needs it avoids duplicating it per sub-node.
Thanks
Srinivas Neeli
>> +
>> +static const struct of_device_id tsn_of_match[] = {
>> + { .compatible = "xlnx,tsn-endpoint-ethernet-mac-3.0" },
>> + { }
>> +};
>> +MODULE_DEVICE_TABLE(of, tsn_of_match);
> [ ... ]
>
next prev parent reply other threads:[~2026-09-24 9:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 19:19 [PATCH net-next v2 0/8] Add Xilinx TSN Endpoint Ethernet MAC driver Srinivas Neeli
2026-09-08 19:19 ` [PATCH net-next v2 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC Srinivas Neeli
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-24 9:29 ` Neeli, Srinivas
2026-09-18 18:15 ` Rob Herring
2026-09-08 19:19 ` [PATCH net-next v2 2/8] net: xilinx: tsn: add TSN endpoint wrapper driver Srinivas Neeli
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-24 9:39 ` Neeli, Srinivas [this message]
2026-09-08 19:19 ` [PATCH net-next v2 3/8] net: xilinx: tsn: add endpoint MAC driver skeleton Srinivas Neeli
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-16 0:23 ` Jakub Kicinski
2026-09-08 19:19 ` [PATCH net-next v2 4/8] net: xilinx: tsn: parse endpoint DMA channel configuration Srinivas Neeli
2026-09-09 19:21 ` sashiko-bot
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-24 10:05 ` Neeli, Srinivas
2026-09-08 19:19 ` [PATCH net-next v2 5/8] net: xilinx: tsn: bring up the endpoint MCDMA channels Srinivas Neeli
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-08 19:19 ` [PATCH net-next v2 6/8] net: xilinx: tsn: add the endpoint RX data path Srinivas Neeli
2026-09-09 19:21 ` sashiko-bot
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-16 0:25 ` Jakub Kicinski
2026-09-08 19:19 ` [PATCH net-next v2 7/8] net: xilinx: tsn: add the endpoint TX " Srinivas Neeli
2026-09-09 19:21 ` sashiko-bot
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-08 19:19 ` [PATCH net-next v2 8/8] net: xilinx: tsn: deliver endpoint RX frames to DSA user ports Srinivas Neeli
2026-09-12 20:36 ` netdev-bot+sashiko
2026-09-16 0:22 ` [PATCH net-next v2 0/8] Add Xilinx TSN Endpoint Ethernet MAC driver Jakub Kicinski
2026-09-16 8:01 ` Neeli, Srinivas
2026-09-16 23:57 ` Jakub Kicinski
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=1e3e6064-83ec-496d-8935-637c87423f85@amd.com \
--to=srneeli@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=michal.simek@amd.com \
--cc=nagadheeraj.rottela@amd.com \
--cc=neelisrinivas18@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rostedt@goodmis.org \
--cc=srinivas.neeli@amd.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
all inboxes | Powered by JetHome®