From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: Suraj Gupta <suraj.gupta2@amd.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Michal Simek <michal.simek@amd.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: xilinx: axienet: Treat xlnx,rxmem as a required property
Date: Fri, 7 Aug 2026 14:03:41 +0530 [thread overview]
Message-ID: <0c33f43b-782b-4c15-ab67-a5038bae3925@amd.com> (raw)
In-Reply-To: <20260806170253.1199749-1-suraj.gupta2@amd.com>
On 8/6/2026 10:32 PM, Suraj Gupta wrote:
> "xlnx,rxmem" device-tree property is used to learn the size of the Rx/Tx
> packet buffer built into the ethernet IP, but return value of
> of_property_read_u32() is ignored. When the property is absent lp->rxmem is
> left at 0, which silently limits the interface to the default MTU and
> disables jumbo frames with no indication of the misconfiguration.
>
> "xlnx,rxmem" has been documented as a required property since the binding
> was introduced. Check the return value of of_property_read_u32() and fail
> probe when the property is missing, so a misconfigured device tree is
> reported rather than silently degrading functionality.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Thanks!> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index fcf517069d16..1722b7038f34 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -2898,7 +2898,10 @@ static int axienet_probe(struct platform_device *pdev)
> * Here we check for memory allocated for Rx/Tx in the hardware from
> * the device-tree and accordingly set flags.
> */
> - of_property_read_u32(pdev->dev.of_node, "xlnx,rxmem", &lp->rxmem);
> + ret = of_property_read_u32(pdev->dev.of_node, "xlnx,rxmem", &lp->rxmem);
> + if (ret)
> + return dev_err_probe(&pdev->dev, ret,
> + "failed to read xlnx,rxmem property\n");
>
> lp->switch_x_sgmii = of_property_read_bool(pdev->dev.of_node,
> "xlnx,switch-x-sgmii");
prev parent reply other threads:[~2026-08-07 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 17:02 [PATCH net-next] net: xilinx: axienet: Treat xlnx,rxmem as a required property Suraj Gupta
2026-08-07 8:33 ` Pandey, Radhey Shyam [this message]
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=0c33f43b-782b-4c15-ab67-a5038bae3925@amd.com \
--to=radheys@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=suraj.gupta2@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