Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node

From: Jakub Kicinski
Date: Thu Apr 28 2022 - 21:41:04 EST


On Fri, 29 Apr 2022 08:46:05 +0800 Jianqun Xu wrote:
> The driver use the value of property 'snps,rx-queues-to-use' to loop
> same numbers child nodes as queues, such as:
>
> gmac {
> rx-queues-config {
> snps,rx-queues-to-use = <1>;
> queue0 {
> // nothing need here.
> };
> };
> };

I think you mean tx, not rx, given the code.

>
> 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;

Also what about the init to defaults I asked about?