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

Jakub Kicinski kuba at kernel.org
Thu Apr 28 18:40:54 PDT 2022


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?



More information about the Linux-rockchip mailing list