linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jianqun Xu <jay.xu@rock-chips.com>
Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com,
	joabreu@synopsys.com, davem@davemloft.net,
	mcoquelin.stm32@gmail.com, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
Date: Thu, 28 Apr 2022 15:40:14 -0700	[thread overview]
Message-ID: <20220428154014.590f6655@kernel.org> (raw)
In-Reply-To: <20220428010927.526310-1-jay.xu@rock-chips.com>

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@rock-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;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-28 22:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  1:09 [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node Jianqun Xu
2022-04-28 22:40 ` Jakub Kicinski [this message]
2022-04-29  0:46 ` [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node Jianqun Xu
2022-04-29  0:56   ` Andrew Lunn
2022-04-29  1:54     ` jay.xu
2022-04-29 12:14       ` Andrew Lunn
2022-05-01  1:40         ` jay.xu
2022-04-29  1:40   ` 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=20220428154014.590f6655@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=jay.xu@rock-chips.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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;
as well as URLs for NNTP newsgroup(s).