From patchwork Thu Apr 28 00:59:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianqun Xu X-Patchwork-Id: 12829857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7461CC433F5 for ; Thu, 28 Apr 2022 01:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tuFcRWLY1DF7Ngo7PQO4fqJudrKVITRltxGPEU1jU+Y=; b=zAX9bU8nz9yyjG qwI8hfnidr31hIG0ONs+vyyMscRzMCdtlFxOu7dKcMEiyNgLxB8YtMoPoF5e9z12yhuX9xzAqvVii mqNfJ4hoaOIDDXvsguESBQ91+ZcGg17JFgElB3JLBDyuRXruSYoXanUTy3nzKhV1ewy+6TYWTmQ5P nNdOJmeft5SCWA2QQ+TN1LDAudjVx0jo7pApztDX/yw+QcVrzhUOCMT2Vo82o7S2RAd0WhoZgMHoa wn6peKIPIUJZXEb7zrD1MGRoZMvkzzznkFHbfpSo9kEbrrHR6L6d9jwtwTVelJ8KoWt4YxDyJ2OMf duYooq9jcKIBA6SUgIcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njsVT-004DcB-8e; Thu, 28 Apr 2022 00:59:43 +0000 Received: from mail-m121145.qiye.163.com ([115.236.121.145]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njsVP-004Dbk-23 for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 00:59:41 +0000 Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 830FE800324; Thu, 28 Apr 2022 08:59:30 +0800 (CST) From: Jianqun Xu To: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com Cc: davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jianqun Xu Subject: [PATCH] ethernet: stmmac: fix for none child queue node for tx node Date: Thu, 28 Apr 2022 08:59:28 +0800 Message-Id: <20220428005928.525921-1-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUlKS0tKN1dZLVlBSVdZDwkaFQgSH1lBWRlMGEJWSUgdGktITx hKThlIVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MyI6Cyo5FT04OhM1ES41CkM3 IzEwFBlVSlVKTU5KSktMTkxKSktDVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUlKS0w3Bg++ X-HM-Tid: 0a806dae2479b03akuuu830fe800324 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_175939_283280_DD3A091D X-CRM114-Status: GOOD ( 10.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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..dfe2375bc3c6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -235,7 +235,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev, else plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP; - queue = 0; + queue = plat->tx_queues_to_use; /* Processing individual TX queue config */ for_each_child_of_node(tx_node, q_node) {