[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220428154014.590f6655@kernel.org>
Date: Thu, 28 Apr 2022 15:40:14 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jianqun Xu <jay.xu@...k-chips.com>
Cc: peppe.cavallaro@...com, alexandre.torgue@...com,
joabreu@...opsys.com, davem@...emloft.net,
mcoquelin.stm32@...il.com, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] ethernet: stmmac: fix for none child queue node
for tx node
On Thu, 28 Apr 2022 09:09:27 +0800 Jianqun Xu wrote:
> In case of nothing to be set for tx node result in no child queue node
> for the tx node, this patch init the queue to tx_queues_to_use instead
> of 0 to support dt file set no queue node for tx node.
>
> Signed-off-by: Jianqun Xu <jay.xu@...k-chips.com>
Something needs to initialize the settings
(plat->tx_queues_cfg[queue].#) to the defaults, no?
Just ignoring the error may not be enough.
Also has this ever worked? If you're trying to make the driver work for
DTs that never worked (and are arguably invalid) -- please change the
subject from "fix..." to "support...".
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 2d8c095f3856..4f01a41c485c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
>
> queue++;
> }
> - if (queue != plat->tx_queues_to_use) {
> + if (queue != plat->tx_queues_to_use && of_get_child_count(tx_node)) {
> ret = -EINVAL;
> dev_err(&pdev->dev, "Not all TX queues were configured\n");
> goto out;
Powered by blists - more mailing lists