Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932641AbdCUPWw (ORCPT ); Tue, 21 Mar 2017 11:22:52 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:51258 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757856AbdCUPWs (ORCPT ); Tue, 21 Mar 2017 11:22:48 -0400 Subject: Re: [PATCH 2/3] net: stmmac: Restore DT backwards-compatibility To: Thierry Reding , "David S . Miller" References: <20170321151211.31841-1-thierry.reding@gmail.com> <20170321151211.31841-2-thierry.reding@gmail.com> CC: Giuseppe Cavallaro , Alexandre Torgue , Joao Pinto , "LABBE Corentin" , , From: Joao Pinto Message-ID: <50db4ab4-ff7b-ca01-c266-d37ee02ac8f0@synopsys.com> Date: Tue, 21 Mar 2017 15:14:19 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170321151211.31841-2-thierry.reding@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.107.19.117] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1417 Lines: 36 ?s 3:12 PM de 3/21/2017, Thierry Reding escreveu: > From: Thierry Reding > > Recent changes to support multiple queues in the device tree bindings > resulted in the number of RX and TX queues to be initialized to zero for > device trees not adhering to the new bindings. > > Restore backwards-compatibility with those device trees by falling back > to a single RX and TX queues each. > > Signed-off-by: Thierry Reding > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 37f550ae76a5..74b0aff79b25 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -143,6 +143,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev, > struct device_node *tx_node; > u8 queue = 0; > > + /* For backwards-compatibility with device trees that don't have any > + * snps,mtl-rx-config or snps,mtl-tx-config properties, we fall back > + * to one RX and TX queues each. > + */ > + plat->rx_queues_to_use = 1; > + plat->tx_queues_to_use = 1; > + > rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); > if (!rx_node) > return; > Acked-By: Joao Pinto