[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed2ec1c2-65c7-4768-99f1-987e5fa39a54@redhat.com>
Date: Fri, 15 Nov 2024 18:17:07 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Parker Newman <parker@...est.io>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Parker Newman <pnewman@...necttech.com>
Subject: Re: [PATCH v1 1/1] net: stmmac: dwmac-tegra: Read iommu stream id
from device tree
On 11/15/24 17:31, Parker Newman wrote:
> From: Parker Newman <pnewman@...necttech.com>
>
> Read the iommu stream id from device tree rather than hard coding to mgbe0.
> Fixes kernel panics when using mgbe controllers other than mgbe0.
It's better to include the full Oops backtrace, possibly decoded.
> Tested with Orin AGX 64GB module on Connect Tech Forge carrier board.
Since this looks like a fix, you should include a suitable 'Fixes' tag
here, and specify the 'net' target tree in the subj prefix.
> @@ -241,6 +243,12 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
> if (IS_ERR(mgbe->xpcs))
> return PTR_ERR(mgbe->xpcs);
>
> + /* get controller's stream id from iommu property in device tree */
> + if (!tegra_dev_iommu_get_stream_id(mgbe->dev, &mgbe->iommu_sid)) {
> + dev_err(mgbe->dev, "failed to get iommu stream id\n");
> + return -EINVAL;
> + }
I *think* it would be better to fallback (possibly with a warning or
notice) to the previous default value when the device tree property is
not available, to avoid regressions.
Thanks,
Paolo
Powered by blists - more mailing lists