linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
@ 2022-04-28  1:09 Jianqun Xu
  2022-04-28 22:40 ` Jakub Kicinski
  2022-04-29  0:46 ` [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node Jianqun Xu
  0 siblings, 2 replies; 8+ messages in thread
From: Jianqun Xu @ 2022-04-28  1:09 UTC (permalink / raw)
  To: peppe.cavallaro, alexandre.torgue, joabreu
  Cc: davem, kuba, mcoquelin.stm32, netdev, linux-arm-kernel,
	linux-kernel, Jianqun Xu

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>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-01  1:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).