All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
@ 2022-04-28  1:09 ` Jianqun Xu
  0 siblings, 0 replies; 20+ messages in thread
From: Jianqun Xu @ 2022-04-28  1:09 UTC (permalink / raw)
  To: peppe.cavallaro, alexandre.torgue, joabreu
  Cc: davem, kuba, mcoquelin.stm32, netdev, linux-arm-kernel,
	linux-kernel, Jianqun Xu

In case of nothing to be set for tx node result in no child queue node
for the tx node, this patch init the queue to tx_queues_to_use instead
of 0 to support dt file set no queue node for tx node.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 2d8c095f3856..4f01a41c485c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
 
 		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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
@ 2022-04-28  1:09 ` Jianqun Xu
  0 siblings, 0 replies; 20+ messages in thread
From: Jianqun Xu @ 2022-04-28  1:09 UTC (permalink / raw)
  To: peppe.cavallaro, alexandre.torgue, joabreu
  Cc: davem, kuba, mcoquelin.stm32, netdev, linux-arm-kernel,
	linux-kernel, Jianqun Xu

In case of nothing to be set for tx node result in no child queue node
for the tx node, this patch init the queue to tx_queues_to_use instead
of 0 to support dt file set no queue node for tx node.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 2d8c095f3856..4f01a41c485c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
 
 		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;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
  2022-04-28  1:09 ` Jianqun Xu
@ 2022-04-28 22:40   ` Jakub Kicinski
  -1 siblings, 0 replies; 20+ messages in thread
From: Jakub Kicinski @ 2022-04-28 22:40 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem,
	mcoquelin.stm32, netdev, linux-arm-kernel, linux-kernel

On Thu, 28 Apr 2022 09:09:27 +0800 Jianqun Xu wrote:
> In case of nothing to be set for tx node result in no child queue node
> for the tx node, this patch init the queue to tx_queues_to_use instead
> of 0 to support dt file set no queue node for tx node.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Something needs to initialize the settings
(plat->tx_queues_cfg[queue].#) to the defaults, no? 
Just ignoring the error may not be enough.

Also has this ever worked? If you're trying to make the driver work for
DTs that never worked (and are arguably invalid) -- please change the
subject from "fix..." to "support...".

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 2d8c095f3856..4f01a41c485c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
>  
>  		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;


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node
@ 2022-04-28 22:40   ` Jakub Kicinski
  0 siblings, 0 replies; 20+ messages in thread
From: Jakub Kicinski @ 2022-04-28 22:40 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem,
	mcoquelin.stm32, netdev, linux-arm-kernel, linux-kernel

On Thu, 28 Apr 2022 09:09:27 +0800 Jianqun Xu wrote:
> In case of nothing to be set for tx node result in no child queue node
> for the tx node, this patch init the queue to tx_queues_to_use instead
> of 0 to support dt file set no queue node for tx node.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Something needs to initialize the settings
(plat->tx_queues_cfg[queue].#) to the defaults, no? 
Just ignoring the error may not be enough.

Also has this ever worked? If you're trying to make the driver work for
DTs that never worked (and are arguably invalid) -- please change the
subject from "fix..." to "support...".

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 2d8c095f3856..4f01a41c485c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
>  
>  		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;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-28  1:09 ` Jianqun Xu
  (?)
@ 2022-04-29  0:46   ` Jianqun Xu
  -1 siblings, 0 replies; 20+ messages in thread
From: Jianqun Xu @ 2022-04-29  0:46 UTC (permalink / raw)
  To: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-rockchip, Jianqun Xu

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

Since a patch for dtc from rockchip will delete all node without any
properties or child node, the queue0 node will be deleted, that caused
the driver fail to probe:

    rk_gmac-dwmac: probe of ffa80000.ethernet failed with error -22

This patch try to support driver work well for DTs without setting for
the child queue nodes and then have none child queue nodes.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
v2:
 - change subject and update commit comment, sugguested by Kicinski

 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 2d8c095f3856..4f01a41c485c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
 
 		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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  0:46   ` Jianqun Xu
  0 siblings, 0 replies; 20+ messages in thread
From: Jianqun Xu @ 2022-04-29  0:46 UTC (permalink / raw)
  To: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-rockchip, Jianqun Xu

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

Since a patch for dtc from rockchip will delete all node without any
properties or child node, the queue0 node will be deleted, that caused
the driver fail to probe:

    rk_gmac-dwmac: probe of ffa80000.ethernet failed with error -22

This patch try to support driver work well for DTs without setting for
the child queue nodes and then have none child queue nodes.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
v2:
 - change subject and update commit comment, sugguested by Kicinski

 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 2d8c095f3856..4f01a41c485c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
 
 		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;
-- 
2.25.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  0:46   ` Jianqun Xu
  0 siblings, 0 replies; 20+ messages in thread
From: Jianqun Xu @ 2022-04-29  0:46 UTC (permalink / raw)
  To: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-rockchip, Jianqun Xu

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

Since a patch for dtc from rockchip will delete all node without any
properties or child node, the queue0 node will be deleted, that caused
the driver fail to probe:

    rk_gmac-dwmac: probe of ffa80000.ethernet failed with error -22

This patch try to support driver work well for DTs without setting for
the child queue nodes and then have none child queue nodes.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
v2:
 - change subject and update commit comment, sugguested by Kicinski

 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 2d8c095f3856..4f01a41c485c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -279,7 +279,7 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
 
 		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;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-29  0:46   ` Jianqun Xu
  (?)
@ 2022-04-29  0:56     ` Andrew Lunn
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29  0:56 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

On Fri, Apr 29, 2022 at 08:46:05AM +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.
> 	    };
> 	};
>     };
> 
> Since a patch for dtc from rockchip will delete all node without any
> properties or child node, the queue0 node will be deleted, that caused
> the driver fail to probe:

Is this the in tree dtc? Do you have a commit hash for it? That should
probably be used as a Fixes: tag. Or that change to dtc needs
reverting because it breaks stuff.

	  Andrew

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  0:56     ` Andrew Lunn
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29  0:56 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

On Fri, Apr 29, 2022 at 08:46:05AM +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.
> 	    };
> 	};
>     };
> 
> Since a patch for dtc from rockchip will delete all node without any
> properties or child node, the queue0 node will be deleted, that caused
> the driver fail to probe:

Is this the in tree dtc? Do you have a commit hash for it? That should
probably be used as a Fixes: tag. Or that change to dtc needs
reverting because it breaks stuff.

	  Andrew

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  0:56     ` Andrew Lunn
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29  0:56 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

On Fri, Apr 29, 2022 at 08:46:05AM +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.
> 	    };
> 	};
>     };
> 
> Since a patch for dtc from rockchip will delete all node without any
> properties or child node, the queue0 node will be deleted, that caused
> the driver fail to probe:

Is this the in tree dtc? Do you have a commit hash for it? That should
probably be used as a Fixes: tag. Or that change to dtc needs
reverting because it breaks stuff.

	  Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-29  0:46   ` Jianqun Xu
  (?)
@ 2022-04-29  1:40     ` Jakub Kicinski
  -1 siblings, 0 replies; 20+ messages in thread
From: Jakub Kicinski @ 2022-04-29  1:40 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

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?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  1:40     ` Jakub Kicinski
  0 siblings, 0 replies; 20+ messages in thread
From: Jakub Kicinski @ 2022-04-29  1:40 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

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?

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  1:40     ` Jakub Kicinski
  0 siblings, 0 replies; 20+ messages in thread
From: Jakub Kicinski @ 2022-04-29  1:40 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, linux-rockchip

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?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-29  0:56     ` Andrew Lunn
@ 2022-04-29  1:54       ` jay.xu
  -1 siblings, 0 replies; 20+ messages in thread
From: jay.xu @ 2022-04-29  1:54 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...

Hi, andrew

--------------
jay.xu@rock-chips.com
>On Fri, Apr 29, 2022 at 08:46:05AM +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.
>>     };
>> };
>>     };
>>
>> Since a patch for dtc from rockchip will delete all node without any
>> properties or child node, the queue0 node will be deleted, that caused
>> the driver fail to probe:
>
>Is this the in tree dtc? Do you have a commit hash for it? That should
>probably be used as a Fixes: tag. Or that change to dtc needs
>reverting because it breaks stuff.
> 
The patch is a hack patch for some products and have not in tree dtc, I said that to
explain a possible case how things happed, it's only a case of no child queue node.

In my mind, it's hard to understand the one property (snps,rx-queues-to-use) does
have a limit for another nodes or properties, if it must work well, the dtc is better to
do a abort, like #size-cells ?

My personally question from a insigth of DTs but gmac, if it's not a good question,
I can simply add a status = "okay" for the empty node and drop this patch.

>	  Andrew
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29  1:54       ` jay.xu
  0 siblings, 0 replies; 20+ messages in thread
From: jay.xu @ 2022-04-29  1:54 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...

Hi, andrew

--------------
jay.xu@rock-chips.com
>On Fri, Apr 29, 2022 at 08:46:05AM +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.
>>     };
>> };
>>     };
>>
>> Since a patch for dtc from rockchip will delete all node without any
>> properties or child node, the queue0 node will be deleted, that caused
>> the driver fail to probe:
>
>Is this the in tree dtc? Do you have a commit hash for it? That should
>probably be used as a Fixes: tag. Or that change to dtc needs
>reverting because it breaks stuff.
> 
The patch is a hack patch for some products and have not in tree dtc, I said that to
explain a possible case how things happed, it's only a case of no child queue node.

In my mind, it's hard to understand the one property (snps,rx-queues-to-use) does
have a limit for another nodes or properties, if it must work well, the dtc is better to
do a abort, like #size-cells ?

My personally question from a insigth of DTs but gmac, if it's not a good question,
I can simply add a status = "okay" for the empty node and drop this patch.

>	  Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-29  1:54       ` jay.xu
  (?)
@ 2022-04-29 12:14         ` Andrew Lunn
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29 12:14 UTC (permalink / raw)
  To: jay.xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...,
	Device Tree

Adding device tree list.

This is mostly a device tree issue, so the device tree Maintainers
should be part of the discussion.

> >On Fri, Apr 29, 2022 at 08:46:05AM +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.
> >>     };
> >> };
> >>     };
> >>
> >> Since a patch for dtc from rockchip will delete all node without any
> >> properties or child node, the queue0 node will be deleted, that caused
> >> the driver fail to probe:
> >
> >Is this the in tree dtc? Do you have a commit hash for it? That should
> >probably be used as a Fixes: tag. Or that change to dtc needs
> >reverting because it breaks stuff.
> > 
> The patch is a hack patch for some products and have not in tree dtc, I said that to
> explain a possible case how things happed, it's only a case of no child queue node.

So this has nothing to do with the kernel dtc, or the upstream
dtc. This is only a 'vendor crap' dtc which has been hacked?

Why should mainline care? Is there anything in the DT standard which
says the compiler can optimise out empty properties?

     Andrew

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29 12:14         ` Andrew Lunn
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29 12:14 UTC (permalink / raw)
  To: jay.xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...,
	Device Tree

Adding device tree list.

This is mostly a device tree issue, so the device tree Maintainers
should be part of the discussion.

> >On Fri, Apr 29, 2022 at 08:46:05AM +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.
> >>     };
> >> };
> >>     };
> >>
> >> Since a patch for dtc from rockchip will delete all node without any
> >> properties or child node, the queue0 node will be deleted, that caused
> >> the driver fail to probe:
> >
> >Is this the in tree dtc? Do you have a commit hash for it? That should
> >probably be used as a Fixes: tag. Or that change to dtc needs
> >reverting because it breaks stuff.
> > 
> The patch is a hack patch for some products and have not in tree dtc, I said that to
> explain a possible case how things happed, it's only a case of no child queue node.

So this has nothing to do with the kernel dtc, or the upstream
dtc. This is only a 'vendor crap' dtc which has been hacked?

Why should mainline care? Is there anything in the DT standard which
says the compiler can optimise out empty properties?

     Andrew

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-04-29 12:14         ` Andrew Lunn
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2022-04-29 12:14 UTC (permalink / raw)
  To: jay.xu
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...,
	Device Tree

Adding device tree list.

This is mostly a device tree issue, so the device tree Maintainers
should be part of the discussion.

> >On Fri, Apr 29, 2022 at 08:46:05AM +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.
> >>     };
> >> };
> >>     };
> >>
> >> Since a patch for dtc from rockchip will delete all node without any
> >> properties or child node, the queue0 node will be deleted, that caused
> >> the driver fail to probe:
> >
> >Is this the in tree dtc? Do you have a commit hash for it? That should
> >probably be used as a Fixes: tag. Or that change to dtc needs
> >reverting because it breaks stuff.
> > 
> The patch is a hack patch for some products and have not in tree dtc, I said that to
> explain a possible case how things happed, it's only a case of no child queue node.

So this has nothing to do with the kernel dtc, or the upstream
dtc. This is only a 'vendor crap' dtc which has been hacked?

Why should mainline care? Is there anything in the DT standard which
says the compiler can optimise out empty properties?

     Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
  2022-04-29 12:14         ` Andrew Lunn
@ 2022-05-01  1:40           ` jay.xu
  -1 siblings, 0 replies; 20+ messages in thread
From: jay.xu @ 2022-05-01  1:40 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...,
	devicetree

Hi Andrew

--------------
jay.xu@rock-chips.com
>Adding device tree list.
>
>This is mostly a device tree issue, so the device tree Maintainers
>should be part of the discussion.
>
>> >On Fri, Apr 29, 2022 at 08:46:05AM +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.
>> >>     };
>> >> };
>> >>     };
>> >>
>> >> Since a patch for dtc from rockchip will delete all node without any
>> >> properties or child node, the queue0 node will be deleted, that caused
>> >> the driver fail to probe:
>> >
>> >Is this the in tree dtc? Do you have a commit hash for it? That should
>> >probably be used as a Fixes: tag. Or that change to dtc needs
>> >reverting because it breaks stuff.
>> >
>> The patch is a hack patch for some products and have not in tree dtc, I said that to
>> explain a possible case how things happed, it's only a case of no child queue node.
>
>So this has nothing to do with the kernel dtc, or the upstream
>dtc. This is only a 'vendor crap' dtc which has been hacked?
>
>Why should mainline care? Is there anything in the DT standard which
>says the compiler can optimise out empty properties? 

Yes, it't nothing about what kind of dtc, does about what rule for properties, now the one property
request another child node must exist and number of child node must equal to the value of the property,
the 
#address-cells = <1>;
#size-cells = <1>;
does this but they are in special key words, the gmac has no likely key word.

>
>     Andrew
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Re: [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node
@ 2022-05-01  1:40           ` jay.xu
  0 siblings, 0 replies; 20+ messages in thread
From: jay.xu @ 2022-05-01  1:40 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: kuba, davem, joabreu, alexandre.torgue, peppe.cavallaro, netdev,
	linux-arm-kernel, Linux Kernel Mailing List,
	open list:ARM/Rockchip SoC...,
	devicetree

Hi Andrew

--------------
jay.xu@rock-chips.com
>Adding device tree list.
>
>This is mostly a device tree issue, so the device tree Maintainers
>should be part of the discussion.
>
>> >On Fri, Apr 29, 2022 at 08:46:05AM +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.
>> >>     };
>> >> };
>> >>     };
>> >>
>> >> Since a patch for dtc from rockchip will delete all node without any
>> >> properties or child node, the queue0 node will be deleted, that caused
>> >> the driver fail to probe:
>> >
>> >Is this the in tree dtc? Do you have a commit hash for it? That should
>> >probably be used as a Fixes: tag. Or that change to dtc needs
>> >reverting because it breaks stuff.
>> >
>> The patch is a hack patch for some products and have not in tree dtc, I said that to
>> explain a possible case how things happed, it's only a case of no child queue node.
>
>So this has nothing to do with the kernel dtc, or the upstream
>dtc. This is only a 'vendor crap' dtc which has been hacked?
>
>Why should mainline care? Is there anything in the DT standard which
>says the compiler can optimise out empty properties? 

Yes, it't nothing about what kind of dtc, does about what rule for properties, now the one property
request another child node must exist and number of child node must equal to the value of the property,
the 
#address-cells = <1>;
#size-cells = <1>;
does this but they are in special key words, the gmac has no likely key word.

>
>     Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-05-01  1:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28  1:09 [PATCH RESEND] ethernet: stmmac: fix for none child queue node for tx node Jianqun Xu
2022-04-28  1:09 ` Jianqun Xu
2022-04-28 22:40 ` Jakub Kicinski
2022-04-28 22:40   ` Jakub Kicinski
2022-04-29  0:46 ` [PATCH V2] ethernet: stmmac: support driver work for DTs without child queue node Jianqun Xu
2022-04-29  0:46   ` Jianqun Xu
2022-04-29  0:46   ` Jianqun Xu
2022-04-29  0:56   ` Andrew Lunn
2022-04-29  0:56     ` Andrew Lunn
2022-04-29  0:56     ` Andrew Lunn
2022-04-29  1:54     ` jay.xu
2022-04-29  1:54       ` jay.xu
2022-04-29 12:14       ` Andrew Lunn
2022-04-29 12:14         ` Andrew Lunn
2022-04-29 12:14         ` Andrew Lunn
2022-05-01  1:40         ` jay.xu
2022-05-01  1:40           ` jay.xu
2022-04-29  1:40   ` Jakub Kicinski
2022-04-29  1:40     ` Jakub Kicinski
2022-04-29  1:40     ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.