From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Joao Pinto <Joao.Pinto@synopsys.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] net: stmmac: Restore DT backwards-compatibility
Date: Wed, 22 Mar 2017 13:38:38 +0100 [thread overview]
Message-ID: <20170322123838.GB24523@Red> (raw)
In-Reply-To: <20170321151211.31841-2-thierry.reding@gmail.com>
On Tue, Mar 21, 2017 at 04:12:10PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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 <treding@nvidia.com>
> ---
> 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;
> --
> 2.12.0
>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Fix one of the reported problem on dwmac-sunxi and dwmac-sun8i
Regards
next prev parent reply other threads:[~2017-03-22 12:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 15:12 [PATCH 1/3] net: stmmac: Always enable MAC RX queues Thierry Reding
2017-03-21 15:12 ` [PATCH 2/3] net: stmmac: Restore DT backwards-compatibility Thierry Reding
2017-03-21 15:14 ` Joao Pinto
2017-03-22 12:38 ` Corentin Labbe [this message]
2017-03-22 19:15 ` David Miller
2017-03-21 15:12 ` [PATCH 3/3] net: stmmac: Use AVB mode by default Thierry Reding
2017-03-21 15:23 ` Joao Pinto
2017-03-21 16:42 ` Thierry Reding
2017-03-21 16:50 ` Joao Pinto
2017-03-21 16:52 ` Joao Pinto
2017-03-22 19:15 ` David Miller
2017-03-21 15:18 ` [PATCH 1/3] net: stmmac: Always enable MAC RX queues Joao Pinto
2017-03-21 16:38 ` Thierry Reding
2017-03-22 19:15 ` David Miller
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=20170322123838.GB24523@Red \
--to=clabbe.montjoie@gmail.com \
--cc=Joao.Pinto@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=thierry.reding@gmail.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).