From mboxrd@z Thu Jan 1 00:00:00 1970 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 8AE4EC433EF for ; Thu, 28 Apr 2022 22:41:28 +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:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fezEgi2zvPZcvD8a939k3LjCJiyuUkbxryk6dpG73dE=; b=orrKnozdcIjixQ wpFH/NeNGB+SAlp+QQkZ7ava17cXI8oORL8cNBRP2/KMYI6GraLJC3LC/oC3x9HHc0Js+58+7/J00 HUKFirivVd2SmJFl503YhqqmZdTR5GZMG0ky5GdiMYceRsr1EXzHkLPNMgg1hsywBJZLzZgjw15YS 2Lz8FqrdicEas/K+2z2Bi6bkTTVAAWlHEMqVMzDJA7rqlqWvsTWjLyto/99+3hcrucu/W/r9cVuaQ /P7Wq5HMr2HxEne/EHqugWVUZ6xnjXl8EKeXh3VnfvcJEeUQ3PTFw7k9wJBQtfcJO68Ray4bhCiHr yp5zFMS+yc9cQ3Nriaag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkCoC-008nfo-Ks; Thu, 28 Apr 2022 22:40:24 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkCo8-008neO-O4 for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 22:40:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3225CB830E3; Thu, 28 Apr 2022 22:40:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E9C8C385AD; Thu, 28 Apr 2022 22:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651185615; bh=wXxogfL874XcDPPyxkQBPeMveMhFBfE8bS1aLYuh9GY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jpbCawBL6V4AJTyN9/txG1j79d8EmUpVaVhRPiqbk0PE53D68QWRi2kw8ZRj57+RU o+OfxlbvZ7OuBoZLvBK2odjxQZBBzraEeyamVGnyAd4diF/BeR0OgNnXCCIQONUEEN fzX/odth6/PHdPe+phUrxxBFSJCrnKowm+xnVh/ZM/PuiOAwO6UdliGZ79O7ui9dLf 4KDBio2ZuNqq+ltee7PbBh8ZXCg1RnDBWx81AIWeXRWot8XTV7VtlRQLu3hTLovMDV 5UTvpwHs0ksgdlMf4MEEx1i3nu92OTGvAcY6m5IaYXeeVBsQTL72sK892xdwkE3CBe vs70ib3iW/dSg== Date: Thu, 28 Apr 2022 15:40:14 -0700 From: Jakub Kicinski To: Jianqun Xu 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 Message-ID: <20220428154014.590f6655@kernel.org> In-Reply-To: <20220428010927.526310-1-jay.xu@rock-chips.com> References: <20220428010927.526310-1-jay.xu@rock-chips.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_154020_978378_80D405D0 X-CRM114-Status: GOOD ( 17.49 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 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