Commit 33e85b8d authored by Thierry Reding's avatar Thierry Reding Committed by David S. Miller

net: stmmac: Restore DT backwards-compatibility

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: default avatarThierry Reding <treding@nvidia.com>
Acked-By: default avatarJoao Pinto <jpinto@synopsys.com>
Tested-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f3976874
...@@ -143,6 +143,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev, ...@@ -143,6 +143,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
struct device_node *tx_node; struct device_node *tx_node;
u8 queue = 0; 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); rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0);
if (!rx_node) if (!rx_node)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment