All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver
@ 2016-02-05 13:31 Sebastian Frias
  2016-02-05 13:39 ` Måns Rullgård
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 13:31 UTC (permalink / raw)
  To: Måns Rullgård, David S. Miller, netdev; +Cc: LKML, mason


Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
  drivers/net/ethernet/aurora/nb8800.c | 19 +++++++++++++++----
  1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c 
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..1353fee 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1461,10 +1461,21 @@ static int nb8800_probe(struct platform_device 
*pdev)
  	}

  	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
-	if (!priv->phy_node) {
-		dev_err(&pdev->dev, "no PHY specified\n");
-		ret = -ENODEV;
-		goto err_free_bus;
+	if (!priv->phy_node)
+	{
+		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+			ret = of_phy_register_fixed_link(pdev->dev.of_node);
+			if (ret < 0) {
+				dev_err(&pdev->dev, "broken fixed-link specification\n");
+				goto err_free_bus;
+			}
+			priv->phy_node = of_node_get(pdev->dev.of_node);
+		}
+		else {
+			dev_err(&pdev->dev, "no PHY specified\n");
+			ret = -ENODEV;
+			goto err_free_bus;
+		}
  	}

  	priv->mii_bus = bus;
-- 
2.1.4

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

* Re: [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 13:31 [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
@ 2016-02-05 13:39 ` Måns Rullgård
  2016-02-05 13:49   ` [PATCH v2] net: ethernet: support "fixed-link" DT key/node " Sebastian Frias
  2016-02-05 15:57   ` [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Andy Shevchenko
  0 siblings, 2 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 13:39 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> Signed-off-by: Sebastian Frias <sf84@laposte.net>
> ---
>  drivers/net/ethernet/aurora/nb8800.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c
> b/drivers/net/ethernet/aurora/nb8800.c
> index ecc4a33..1353fee 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1461,10 +1461,21 @@ static int nb8800_probe(struct platform_device
> *pdev)
>  	}
>
>  	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
> -	if (!priv->phy_node) {
> -		dev_err(&pdev->dev, "no PHY specified\n");
> -		ret = -ENODEV;
> -		goto err_free_bus;
> +	if (!priv->phy_node)
> +	{
> +		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> +			ret = of_phy_register_fixed_link(pdev->dev.of_node);
> +			if (ret < 0) {
> +				dev_err(&pdev->dev, "broken fixed-link specification\n");

Line is longer than 80 chars.

> +				goto err_free_bus;
> +			}
> +			priv->phy_node = of_node_get(pdev->dev.of_node);
> +		}
> +		else {

Wrong brace placement.

> +			dev_err(&pdev->dev, "no PHY specified\n");
> +			ret = -ENODEV;
> +			goto err_free_bus;
> +		}
>  	}
>
>  	priv->mii_bus = bus;
> -- 
> 2.1.4
>

-- 
Måns Rullgård

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

* [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver
  2016-02-05 13:39 ` Måns Rullgård
@ 2016-02-05 13:49   ` Sebastian Frias
  2016-02-05 13:58     ` Måns Rullgård
  2016-02-05 15:57   ` [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Andy Shevchenko
  1 sibling, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 13:49 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason


Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
  drivers/net/ethernet/aurora/nb8800.c | 15 ++++++++++++---
  1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c 
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..dd7bedc 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1462,9 +1462,18 @@ static int nb8800_probe(struct platform_device *pdev)

  	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
  	if (!priv->phy_node) {
-		dev_err(&pdev->dev, "no PHY specified\n");
-		ret = -ENODEV;
-		goto err_free_bus;
+		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+			ret = of_phy_register_fixed_link(pdev->dev.of_node);
+			if (ret < 0) {
+				dev_err(&pdev->dev, "bad fixed-link spec\n");
+				goto err_free_bus;
+			}
+			priv->phy_node = of_node_get(pdev->dev.of_node);
+		} else {
+			dev_err(&pdev->dev, "no PHY specified\n");
+			ret = -ENODEV;
+			goto err_free_bus;
+		}
  	}

  	priv->mii_bus = bus;
-- 
2.1.4

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

* Re: [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver
  2016-02-05 13:49   ` [PATCH v2] net: ethernet: support "fixed-link" DT key/node " Sebastian Frias
@ 2016-02-05 13:58     ` Måns Rullgård
  2016-02-05 14:08       ` Sebastian Frias
  0 siblings, 1 reply; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 13:58 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> Signed-off-by: Sebastian Frias <sf84@laposte.net>
> ---
>  drivers/net/ethernet/aurora/nb8800.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c
> b/drivers/net/ethernet/aurora/nb8800.c
> index ecc4a33..dd7bedc 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1462,9 +1462,18 @@ static int nb8800_probe(struct platform_device *pdev)
>
>  	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>  	if (!priv->phy_node) {
> -		dev_err(&pdev->dev, "no PHY specified\n");
> -		ret = -ENODEV;
> -		goto err_free_bus;
> +		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> +			ret = of_phy_register_fixed_link(pdev->dev.of_node);
> +			if (ret < 0) {
> +				dev_err(&pdev->dev, "bad fixed-link spec\n");
> +				goto err_free_bus;
> +			}
> +			priv->phy_node = of_node_get(pdev->dev.of_node);
> +		} else {
> +			dev_err(&pdev->dev, "no PHY specified\n");
> +			ret = -ENODEV;
> +			goto err_free_bus;
> +		}
>  	}

Maybe it would be clearer to reduce the if() nesting a bit, like this
for instance:

	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
		ret = of_phy_register_fixed_link(pdev->dev.of_node);
		if (ret < 0) {
			dev_err(&pdev->dev, "bad fixed-link spec\n");
			goto err_free_bus;
		}
		priv->phy_node = of_node_get(pdev->dev.of_node);
	}

	if (!priv->phy_node)
		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
						  "phy-handle", 0);

	if (!priv->phy_node) {
		dev_err(&pdev->dev, "no PHY specified\n");
		ret = -ENODEV;
		goto err_free_bus;
	}


-- 
Måns Rullgård

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

* Re: [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver
  2016-02-05 13:58     ` Måns Rullgård
@ 2016-02-05 14:08       ` Sebastian Frias
  2016-02-05 14:13         ` Måns Rullgård
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 14:08 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason

On 02/05/2016 02:58 PM, Måns Rullgård wrote:
> Sebastian Frias <sf84@laposte.net> writes:
>
>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>> ---
>>   drivers/net/ethernet/aurora/nb8800.c | 15 ++++++++++++---
>>   1 file changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>> b/drivers/net/ethernet/aurora/nb8800.c
>> index ecc4a33..dd7bedc 100644
>> --- a/drivers/net/ethernet/aurora/nb8800.c
>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>> @@ -1462,9 +1462,18 @@ static int nb8800_probe(struct platform_device *pdev)
>>
>>   	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>   	if (!priv->phy_node) {
>> -		dev_err(&pdev->dev, "no PHY specified\n");
>> -		ret = -ENODEV;
>> -		goto err_free_bus;
>> +		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>> +			ret = of_phy_register_fixed_link(pdev->dev.of_node);
>> +			if (ret < 0) {
>> +				dev_err(&pdev->dev, "bad fixed-link spec\n");
>> +				goto err_free_bus;
>> +			}
>> +			priv->phy_node = of_node_get(pdev->dev.of_node);
>> +		} else {
>> +			dev_err(&pdev->dev, "no PHY specified\n");
>> +			ret = -ENODEV;
>> +			goto err_free_bus;
>> +		}
>>   	}
>
> Maybe it would be clearer to reduce the if() nesting a bit, like this
> for instance:
>
> 	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> 		ret = of_phy_register_fixed_link(pdev->dev.of_node);
> 		if (ret < 0) {
> 			dev_err(&pdev->dev, "bad fixed-link spec\n");
> 			goto err_free_bus;
> 		}
> 		priv->phy_node = of_node_get(pdev->dev.of_node);
> 	}
>
> 	if (!priv->phy_node)
> 		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
> 						  "phy-handle", 0);
>
> 	if (!priv->phy_node) {
> 		dev_err(&pdev->dev, "no PHY specified\n");
> 		ret = -ENODEV;
> 		goto err_free_bus;
> 	}
>
>

Thanks Måns for your comments.
With old code + my patch, we only hit 1 comparison in the general case, 
and a 2nd one in "fixed-link" case.
With your suggestion above, it would mean that we hit 3 comparisons all 
the time.
If you are ok with the 3 comparisons, I can post a v3.

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

* Re: [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver
  2016-02-05 14:08       ` Sebastian Frias
@ 2016-02-05 14:13         ` Måns Rullgård
  2016-02-05 14:22           ` [PATCH v3] net: ethernet: support "fixed-link" DT node " Sebastian Frias
  0 siblings, 1 reply; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 14:13 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> On 02/05/2016 02:58 PM, Måns Rullgård wrote:
>> Sebastian Frias <sf84@laposte.net> writes:
>>
>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>> ---
>>>   drivers/net/ethernet/aurora/nb8800.c | 15 ++++++++++++---
>>>   1 file changed, 12 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>>> b/drivers/net/ethernet/aurora/nb8800.c
>>> index ecc4a33..dd7bedc 100644
>>> --- a/drivers/net/ethernet/aurora/nb8800.c
>>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>>> @@ -1462,9 +1462,18 @@ static int nb8800_probe(struct platform_device *pdev)
>>>
>>>   	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>>   	if (!priv->phy_node) {
>>> -		dev_err(&pdev->dev, "no PHY specified\n");
>>> -		ret = -ENODEV;
>>> -		goto err_free_bus;
>>> +		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>>> +			ret = of_phy_register_fixed_link(pdev->dev.of_node);
>>> +			if (ret < 0) {
>>> +				dev_err(&pdev->dev, "bad fixed-link spec\n");
>>> +				goto err_free_bus;
>>> +			}
>>> +			priv->phy_node = of_node_get(pdev->dev.of_node);
>>> +		} else {
>>> +			dev_err(&pdev->dev, "no PHY specified\n");
>>> +			ret = -ENODEV;
>>> +			goto err_free_bus;
>>> +		}
>>>   	}
>>
>> Maybe it would be clearer to reduce the if() nesting a bit, like this
>> for instance:
>>
>> 	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>> 		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>> 		if (ret < 0) {
>> 			dev_err(&pdev->dev, "bad fixed-link spec\n");
>> 			goto err_free_bus;
>> 		}
>> 		priv->phy_node = of_node_get(pdev->dev.of_node);
>> 	}
>>
>> 	if (!priv->phy_node)
>> 		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>> 						  "phy-handle", 0);
>>
>> 	if (!priv->phy_node) {
>> 		dev_err(&pdev->dev, "no PHY specified\n");
>> 		ret = -ENODEV;
>> 		goto err_free_bus;
>> 	}
>>
>>
>
> Thanks Måns for your comments.
> With old code + my patch, we only hit 1 comparison in the general
> case, and a 2nd one in "fixed-link" case.
> With your suggestion above, it would mean that we hit 3 comparisons
> all the time.
> If you are ok with the 3 comparisons, I can post a v3.

This is code that runs once so IMO clarity is more important than a
minuscule speed difference.

-- 
Måns Rullgård

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

* [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 14:13         ` Måns Rullgård
@ 2016-02-05 14:22           ` Sebastian Frias
  2016-02-05 14:34             ` Måns Rullgård
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 14:22 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason


Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
  drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c 
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..e1fb071 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
  		goto err_disable_clk;
  	}

-	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
+	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+		ret = of_phy_register_fixed_link(pdev->dev.of_node);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "bad fixed-link spec\n");
+			goto err_free_bus;
+		}
+		priv->phy_node = of_node_get(pdev->dev.of_node);
+	}
+
+	if (!priv->phy_node)
+		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
+						  "phy-handle", 0);
+
  	if (!priv->phy_node) {
  		dev_err(&pdev->dev, "no PHY specified\n");
  		ret = -ENODEV;
-- 
2.1.4

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 14:22           ` [PATCH v3] net: ethernet: support "fixed-link" DT node " Sebastian Frias
@ 2016-02-05 14:34             ` Måns Rullgård
  2016-02-05 14:56               ` Sebastian Frias
  2016-02-05 14:56               ` [PATCH v4] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
  0 siblings, 2 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 14:34 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> Signed-off-by: Sebastian Frias <sf84@laposte.net>

Please change the subject to something like "net: ethernet: nb8800:
support fixed-link DT node" and add a comment body.

> ---
>  drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c
> b/drivers/net/ethernet/aurora/nb8800.c
> index ecc4a33..e1fb071 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>  		goto err_disable_clk;
>  	}
>
> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
> +		if (ret < 0) {
> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
> +			goto err_free_bus;
> +		}
> +		priv->phy_node = of_node_get(pdev->dev.of_node);
> +	}
> +
> +	if (!priv->phy_node)
> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
> +						  "phy-handle", 0);
> +
>  	if (!priv->phy_node) {
>  		dev_err(&pdev->dev, "no PHY specified\n");
>  		ret = -ENODEV;
> -- 
> 2.1.4

-- 
Måns Rullgård

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 14:34             ` Måns Rullgård
@ 2016-02-05 14:56               ` Sebastian Frias
  2016-02-05 15:08                 ` Måns Rullgård
  2016-02-05 14:56               ` [PATCH v4] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
  1 sibling, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 14:56 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason

On 02/05/2016 03:34 PM, Måns Rullgård wrote:
> Sebastian Frias <sf84@laposte.net> writes:
>
>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>
> Please change the subject to something like "net: ethernet: nb8800:
> support fixed-link DT node" and add a comment body.

The subject is pretty explicit for such a simple patch, what else could 
I add that wouldn't be unnecessary chat?

>
>> ---
>>   drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>>   1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>> b/drivers/net/ethernet/aurora/nb8800.c
>> index ecc4a33..e1fb071 100644
>> --- a/drivers/net/ethernet/aurora/nb8800.c
>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>>   		goto err_disable_clk;
>>   	}
>>
>> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>> +		if (ret < 0) {
>> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
>> +			goto err_free_bus;
>> +		}
>> +		priv->phy_node = of_node_get(pdev->dev.of_node);
>> +	}
>> +
>> +	if (!priv->phy_node)
>> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>> +						  "phy-handle", 0);
>> +
>>   	if (!priv->phy_node) {
>>   		dev_err(&pdev->dev, "no PHY specified\n");
>>   		ret = -ENODEV;
>> --
>> 2.1.4
>

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

* [PATCH v4] net: ethernet: nb8800: support fixed-link DT node
  2016-02-05 14:34             ` Måns Rullgård
  2016-02-05 14:56               ` Sebastian Frias
@ 2016-02-05 14:56               ` Sebastian Frias
  1 sibling, 0 replies; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 14:56 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason


Properly handles the case where the PHY is not connected
to the real MDIO bus

Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
  drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c 
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..e1fb071 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
  		goto err_disable_clk;
  	}

-	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
+	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+		ret = of_phy_register_fixed_link(pdev->dev.of_node);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "bad fixed-link spec\n");
+			goto err_free_bus;
+		}
+		priv->phy_node = of_node_get(pdev->dev.of_node);
+	}
+
+	if (!priv->phy_node)
+		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
+						  "phy-handle", 0);
+
  	if (!priv->phy_node) {
  		dev_err(&pdev->dev, "no PHY specified\n");
  		ret = -ENODEV;
-- 
2.1.4

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 14:56               ` Sebastian Frias
@ 2016-02-05 15:08                 ` Måns Rullgård
  2016-02-05 15:20                   ` Sebastian Frias
  0 siblings, 1 reply; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 15:08 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>> Sebastian Frias <sf84@laposte.net> writes:
>>
>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>
>> Please change the subject to something like "net: ethernet: nb8800:
>> support fixed-link DT node" and add a comment body.
>
> The subject is pretty explicit for such a simple patch, what else
> could I add that wouldn't be unnecessary chat?

It's customary to include a description body even if it's little more
than a restatement of the subject.  Also, while the subject usually only
says _what_ the patch does, the body should additionally state _why_ it
is needed.

>>> ---
>>>   drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>>>   1 file changed, 13 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>>> b/drivers/net/ethernet/aurora/nb8800.c
>>> index ecc4a33..e1fb071 100644
>>> --- a/drivers/net/ethernet/aurora/nb8800.c
>>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>>>   		goto err_disable_clk;
>>>   	}
>>>
>>> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>>> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>>> +		if (ret < 0) {
>>> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
>>> +			goto err_free_bus;
>>> +		}
>>> +		priv->phy_node = of_node_get(pdev->dev.of_node);
>>> +	}
>>> +
>>> +	if (!priv->phy_node)
>>> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>>> +						  "phy-handle", 0);
>>> +
>>>   	if (!priv->phy_node) {
>>>   		dev_err(&pdev->dev, "no PHY specified\n");
>>>   		ret = -ENODEV;
>>> --
>>> 2.1.4
>>

-- 
Måns Rullgård

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 15:08                 ` Måns Rullgård
@ 2016-02-05 15:20                   ` Sebastian Frias
  2016-02-05 15:26                     ` Måns Rullgård
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-05 15:20 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason

On 02/05/2016 04:08 PM, Måns Rullgård wrote:
> Sebastian Frias <sf84@laposte.net> writes:
>
>> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>>> Sebastian Frias <sf84@laposte.net> writes:
>>>
>>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>>
>>> Please change the subject to something like "net: ethernet: nb8800:
>>> support fixed-link DT node" and add a comment body.
>>
>> The subject is pretty explicit for such a simple patch, what else
>> could I add that wouldn't be unnecessary chat?
>
> It's customary to include a description body even if it's little more
> than a restatement of the subject.  Also, while the subject usually only
> says _what_ the patch does, the body should additionally state _why_ it
> is needed.

I understand, but _why_ it is needed is also obvious in this case; I 
mean, without the patch "fixed-link" cannot be used.
Other patches may not be as obvious/simple and thus justify and require 
more details.

Anyway, I added "Properly handles the case where the PHY is not connected
to the real MDIO bus" would that be ok?

>
>>>> ---
>>>>    drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>>>>    1 file changed, 13 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>>>> b/drivers/net/ethernet/aurora/nb8800.c
>>>> index ecc4a33..e1fb071 100644
>>>> --- a/drivers/net/ethernet/aurora/nb8800.c
>>>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>>>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>>>>    		goto err_disable_clk;
>>>>    	}
>>>>
>>>> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>>> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>>>> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>>>> +		if (ret < 0) {
>>>> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
>>>> +			goto err_free_bus;
>>>> +		}
>>>> +		priv->phy_node = of_node_get(pdev->dev.of_node);
>>>> +	}
>>>> +
>>>> +	if (!priv->phy_node)
>>>> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>>>> +						  "phy-handle", 0);
>>>> +
>>>>    	if (!priv->phy_node) {
>>>>    		dev_err(&pdev->dev, "no PHY specified\n");
>>>>    		ret = -ENODEV;
>>>> --
>>>> 2.1.4
>>>
>

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 15:20                   ` Sebastian Frias
@ 2016-02-05 15:26                     ` Måns Rullgård
  2016-02-08 10:23                       ` [PATCH v5] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
  2016-02-08 10:34                       ` [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
  0 siblings, 2 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 15:26 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> On 02/05/2016 04:08 PM, Måns Rullgård wrote:
>> Sebastian Frias <sf84@laposte.net> writes:
>>
>>> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>
>>>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>>>
>>>> Please change the subject to something like "net: ethernet: nb8800:
>>>> support fixed-link DT node" and add a comment body.
>>>
>>> The subject is pretty explicit for such a simple patch, what else
>>> could I add that wouldn't be unnecessary chat?
>>
>> It's customary to include a description body even if it's little more
>> than a restatement of the subject.  Also, while the subject usually only
>> says _what_ the patch does, the body should additionally state _why_ it
>> is needed.
>
> I understand, but _why_ it is needed is also obvious in this case; I
> mean, without the patch "fixed-link" cannot be used.

Then say so.

> Other patches may not be as obvious/simple and thus justify and
> require more details.
>
> Anyway, I added "Properly handles the case where the PHY is not connected
> to the real MDIO bus" would that be ok?

Have you read Documentation/SubmittingPatches?  Do so (again) and pay
special attention to section 2 "Describe your changes."

>>>>> ---
>>>>>    drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>>>>>    1 file changed, 13 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>>>>> b/drivers/net/ethernet/aurora/nb8800.c
>>>>> index ecc4a33..e1fb071 100644
>>>>> --- a/drivers/net/ethernet/aurora/nb8800.c
>>>>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>>>>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>>>>>    		goto err_disable_clk;
>>>>>    	}
>>>>>
>>>>> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>>>> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>>>>> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>>>>> +		if (ret < 0) {
>>>>> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
>>>>> +			goto err_free_bus;
>>>>> +		}
>>>>> +		priv->phy_node = of_node_get(pdev->dev.of_node);
>>>>> +	}
>>>>> +
>>>>> +	if (!priv->phy_node)
>>>>> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>>>>> +						  "phy-handle", 0);
>>>>> +
>>>>>    	if (!priv->phy_node) {
>>>>>    		dev_err(&pdev->dev, "no PHY specified\n");
>>>>>    		ret = -ENODEV;
>>>>> --
>>>>> 2.1.4
>>>>
>>

-- 
Måns Rullgård

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

* Re: [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 13:39 ` Måns Rullgård
  2016-02-05 13:49   ` [PATCH v2] net: ethernet: support "fixed-link" DT key/node " Sebastian Frias
@ 2016-02-05 15:57   ` Andy Shevchenko
  2016-02-05 15:58     ` Måns Rullgård
  1 sibling, 1 reply; 26+ messages in thread
From: Andy Shevchenko @ 2016-02-05 15:57 UTC (permalink / raw)
  To: Måns Rullgård
  Cc: Sebastian Frias, David S. Miller, netdev, LKML, mason

On Fri, Feb 5, 2016 at 3:39 PM, Måns Rullgård <mans@mansr.com> wrote:
>> +                     if (ret < 0) {
>> +                             dev_err(&pdev->dev, "broken fixed-link specification\n");
>
> Line is longer than 80 chars.

This is actually okay, though I would recommend to move long string
literal to the next line.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 15:57   ` [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Andy Shevchenko
@ 2016-02-05 15:58     ` Måns Rullgård
  0 siblings, 0 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-05 15:58 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Sebastian Frias, David S. Miller, netdev, LKML, mason

Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Fri, Feb 5, 2016 at 3:39 PM, Måns Rullgård <mans@mansr.com> wrote:
>>> +                     if (ret < 0) {
>>> +                             dev_err(&pdev->dev, "broken fixed-link specification\n");
>>
>> Line is longer than 80 chars.
>
> This is actually okay, though I would recommend to move long string
> literal to the next line.

I only mentioned it because fixing it was trivial.

-- 
Måns Rullgård

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

* [PATCH v5] net: ethernet: nb8800: support fixed-link DT node
  2016-02-05 15:26                     ` Måns Rullgård
@ 2016-02-08 10:23                       ` Sebastian Frias
  2016-02-08 13:19                         ` Måns Rullgård
  2016-02-16 20:04                         ` David Miller
  2016-02-08 10:34                       ` [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
  1 sibling, 2 replies; 26+ messages in thread
From: Sebastian Frias @ 2016-02-08 10:23 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason


Under some circumstances, for example when connecting
to a switch:

https://stackoverflow.com/questions/31046172/device-tree-for-phy-less-connection-to-a-dsa-switch

the ethernet port will not be connected to a PHY.
In that case a "fixed-link" DT node can be used to replace it.

This patch adds support for the "fixed-link" node to the
nb8800 driver.

Signed-off-by: Sebastian Frias <sf84@laposte.net>
---
  drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aurora/nb8800.c 
b/drivers/net/ethernet/aurora/nb8800.c
index ecc4a33..e1fb071 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
  		goto err_disable_clk;
  	}

-	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
+	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
+		ret = of_phy_register_fixed_link(pdev->dev.of_node);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "bad fixed-link spec\n");
+			goto err_free_bus;
+		}
+		priv->phy_node = of_node_get(pdev->dev.of_node);
+	}
+
+	if (!priv->phy_node)
+		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
+						  "phy-handle", 0);
+
  	if (!priv->phy_node) {
  		dev_err(&pdev->dev, "no PHY specified\n");
  		ret = -ENODEV;
-- 
2.1.4

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-05 15:26                     ` Måns Rullgård
  2016-02-08 10:23                       ` [PATCH v5] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
@ 2016-02-08 10:34                       ` Sebastian Frias
  2016-02-08 13:37                         ` Måns Rullgård
  1 sibling, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-08 10:34 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason

On 02/05/2016 04:26 PM, Måns Rullgård wrote:
> Sebastian Frias <sf84@laposte.net> writes:
>
>> On 02/05/2016 04:08 PM, Måns Rullgård wrote:
>>> Sebastian Frias <sf84@laposte.net> writes:
>>>
>>>> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>>
>>>>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>>>>
>>>>> Please change the subject to something like "net: ethernet: nb8800:
>>>>> support fixed-link DT node" and add a comment body.
>>>>
>>>> The subject is pretty explicit for such a simple patch, what else
>>>> could I add that wouldn't be unnecessary chat?
>>>
>>> It's customary to include a description body even if it's little more
>>> than a restatement of the subject.  Also, while the subject usually only
>>> says _what_ the patch does, the body should additionally state _why_ it
>>> is needed.
>>
>> I understand, but _why_ it is needed is also obvious in this case; I
>> mean, without the patch "fixed-link" cannot be used.
>
> Then say so.
>
>> Other patches may not be as obvious/simple and thus justify and
>> require more details.
>>
>> Anyway, I added "Properly handles the case where the PHY is not connected
>> to the real MDIO bus" would that be ok?
>
> Have you read Documentation/SubmittingPatches?  Do so (again) and pay
> special attention to section 2 "Describe your changes."

I just sent v5.
If for whatever reason, you or anybody else think that the comment is 
not good, would you mind proposing a comment that would make everybody 
happy so that the patch goes thru?
And if you or anybody else does not want the patch, could you please say 
so as well?

I have to admit this process (sending patches and getting it reviewed) 
could benefit from more clarifications.
For example, the process could say that at least 2 reviewers must agree 
on it (on the comments made to the patch and on the patch itself).
I could also say that reviewers are to express not only their opinion 
but to clearly and unequivocally accept or reject.

For instance, right now, it is not clear to me if your comments are 
"nice to have" or "blocking" the patch.
I don't know if the patch is welcome or not, etc.
So I submitted v5, but maybe it was not even necessary, it's hard to 
know where in the submission process we are.

By the way, I know some people like the command line, email, etc. but 
there ought to be other tools better suited for patch review...




>
>>>>>> ---
>>>>>>     drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>>>>>>     1 file changed, 13 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/net/ethernet/aurora/nb8800.c
>>>>>> b/drivers/net/ethernet/aurora/nb8800.c
>>>>>> index ecc4a33..e1fb071 100644
>>>>>> --- a/drivers/net/ethernet/aurora/nb8800.c
>>>>>> +++ b/drivers/net/ethernet/aurora/nb8800.c
>>>>>> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>>>>>>     		goto err_disable_clk;
>>>>>>     	}
>>>>>>
>>>>>> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
>>>>>> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
>>>>>> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
>>>>>> +		if (ret < 0) {
>>>>>> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
>>>>>> +			goto err_free_bus;
>>>>>> +		}
>>>>>> +		priv->phy_node = of_node_get(pdev->dev.of_node);
>>>>>> +	}
>>>>>> +
>>>>>> +	if (!priv->phy_node)
>>>>>> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
>>>>>> +						  "phy-handle", 0);
>>>>>> +
>>>>>>     	if (!priv->phy_node) {
>>>>>>     		dev_err(&pdev->dev, "no PHY specified\n");
>>>>>>     		ret = -ENODEV;
>>>>>> --
>>>>>> 2.1.4
>>>>>
>>>
>

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

* Re: [PATCH v5] net: ethernet: nb8800: support fixed-link DT node
  2016-02-08 10:23                       ` [PATCH v5] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
@ 2016-02-08 13:19                         ` Måns Rullgård
  2016-02-16 20:04                         ` David Miller
  1 sibling, 0 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-08 13:19 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> Under some circumstances, for example when connecting
> to a switch:
>
> https://stackoverflow.com/questions/31046172/device-tree-for-phy-less-connection-to-a-dsa-switch
>
> the ethernet port will not be connected to a PHY.
> In that case a "fixed-link" DT node can be used to replace it.
>
> This patch adds support for the "fixed-link" node to the
> nb8800 driver.
>
> Signed-off-by: Sebastian Frias <sf84@laposte.net>

Acked-by: Mans Rullgard <mans@mansr.com>

> ---
>  drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c
> b/drivers/net/ethernet/aurora/nb8800.c
> index ecc4a33..e1fb071 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1460,7 +1460,19 @@ static int nb8800_probe(struct platform_device *pdev)
>  		goto err_disable_clk;
>  	}
>
> -	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
> +	if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> +		ret = of_phy_register_fixed_link(pdev->dev.of_node);
> +		if (ret < 0) {
> +			dev_err(&pdev->dev, "bad fixed-link spec\n");
> +			goto err_free_bus;
> +		}
> +		priv->phy_node = of_node_get(pdev->dev.of_node);
> +	}
> +
> +	if (!priv->phy_node)
> +		priv->phy_node = of_parse_phandle(pdev->dev.of_node,
> +						  "phy-handle", 0);
> +
>  	if (!priv->phy_node) {
>  		dev_err(&pdev->dev, "no PHY specified\n");
>  		ret = -ENODEV;
> -- 
> 2.1.4
>

-- 
Måns Rullgård

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 10:34                       ` [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
@ 2016-02-08 13:37                         ` Måns Rullgård
  2016-02-08 14:11                           ` Mason
  2016-02-08 14:32                           ` Sebastian Frias
  0 siblings, 2 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-08 13:37 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

> On 02/05/2016 04:26 PM, Måns Rullgård wrote:
>> Sebastian Frias <sf84@laposte.net> writes:
>>
>>> On 02/05/2016 04:08 PM, Måns Rullgård wrote:
>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>
>>>>> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>>>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>>>
>>>>>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>>>>>
>>>>>> Please change the subject to something like "net: ethernet: nb8800:
>>>>>> support fixed-link DT node" and add a comment body.
>>>>>
>>>>> The subject is pretty explicit for such a simple patch, what else
>>>>> could I add that wouldn't be unnecessary chat?
>>>>
>>>> It's customary to include a description body even if it's little more
>>>> than a restatement of the subject.  Also, while the subject usually only
>>>> says _what_ the patch does, the body should additionally state _why_ it
>>>> is needed.
>>>
>>> I understand, but _why_ it is needed is also obvious in this case; I
>>> mean, without the patch "fixed-link" cannot be used.
>>
>> Then say so.
>>
>>> Other patches may not be as obvious/simple and thus justify and
>>> require more details.
>>>
>>> Anyway, I added "Properly handles the case where the PHY is not connected
>>> to the real MDIO bus" would that be ok?
>>
>> Have you read Documentation/SubmittingPatches?  Do so (again) and pay
>> special attention to section 2 "Describe your changes."
>
> I just sent v5.

Thanks for your patience.

> If for whatever reason, you or anybody else think that the comment is
> not good, would you mind proposing a comment that would make everybody
> happy so that the patch goes thru?
> And if you or anybody else does not want the patch, could you please
> say so as well?
>
> I have to admit this process (sending patches and getting it reviewed)
> could benefit from more clarifications.
> For example, the process could say that at least 2 reviewers must
> agree on it (on the comments made to the patch and on the patch
> itself).
> I could also say that reviewers are to express not only their opinion
> but to clearly and unequivocally accept or reject.
>
> For instance, right now, it is not clear to me if your comments are
> "nice to have" or "blocking" the patch.
> I don't know if the patch is welcome or not, etc.
> So I submitted v5, but maybe it was not even necessary, it's hard to
> know where in the submission process we are.

In this case, it's ultimately up to Dave Miller.  He'll take into
account whatever comments others have made and decide whether he wants
to accept it.

> By the way, I know some people like the command line, email, etc. but
> there ought to be other tools better suited for patch review...

Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
of various patches.

-- 
Måns Rullgård

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 13:37                         ` Måns Rullgård
@ 2016-02-08 14:11                           ` Mason
  2016-02-08 14:38                             ` Sebastian Frias
  2016-02-08 14:32                           ` Sebastian Frias
  1 sibling, 1 reply; 26+ messages in thread
From: Mason @ 2016-02-08 14:11 UTC (permalink / raw)
  To: Mans Rullgard, Sebastian Frias; +Cc: David S. Miller, netdev, LKML

On 08/02/2016 14:37, Måns Rullgård wrote:

> Sebastian Frias wrote:
> 
>> By the way, I know some people like the command line, email, etc. but
>> there ought to be other tools better suited for patch review...
> 
> Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
> of various patches.

There's also a kernel bugzilla, but it may be for actual bugs.
https://bugzilla.kernel.org/

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 13:37                         ` Måns Rullgård
  2016-02-08 14:11                           ` Mason
@ 2016-02-08 14:32                           ` Sebastian Frias
  2016-02-08 14:50                             ` Måns Rullgård
  1 sibling, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-08 14:32 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: David S. Miller, netdev, LKML, mason

On 02/08/2016 02:37 PM, Måns Rullgård wrote:
> Sebastian Frias <sf84@laposte.net> writes:
>
>> On 02/05/2016 04:26 PM, Måns Rullgård wrote:
>>> Sebastian Frias <sf84@laposte.net> writes:
>>>
>>>> On 02/05/2016 04:08 PM, Måns Rullgård wrote:
>>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>>
>>>>>> On 02/05/2016 03:34 PM, Måns Rullgård wrote:
>>>>>>> Sebastian Frias <sf84@laposte.net> writes:
>>>>>>>
>>>>>>>> Signed-off-by: Sebastian Frias <sf84@laposte.net>
>>>>>>>
>>>>>>> Please change the subject to something like "net: ethernet: nb8800:
>>>>>>> support fixed-link DT node" and add a comment body.
>>>>>>
>>>>>> The subject is pretty explicit for such a simple patch, what else
>>>>>> could I add that wouldn't be unnecessary chat?
>>>>>
>>>>> It's customary to include a description body even if it's little more
>>>>> than a restatement of the subject.  Also, while the subject usually only
>>>>> says _what_ the patch does, the body should additionally state _why_ it
>>>>> is needed.
>>>>
>>>> I understand, but _why_ it is needed is also obvious in this case; I
>>>> mean, without the patch "fixed-link" cannot be used.
>>>
>>> Then say so.
>>>
>>>> Other patches may not be as obvious/simple and thus justify and
>>>> require more details.
>>>>
>>>> Anyway, I added "Properly handles the case where the PHY is not connected
>>>> to the real MDIO bus" would that be ok?
>>>
>>> Have you read Documentation/SubmittingPatches?  Do so (again) and pay
>>> special attention to section 2 "Describe your changes."
>>
>> I just sent v5.
>
> Thanks for your patience.

:-)

>
>> If for whatever reason, you or anybody else think that the comment is
>> not good, would you mind proposing a comment that would make everybody
>> happy so that the patch goes thru?
>> And if you or anybody else does not want the patch, could you please
>> say so as well?
>>
>> I have to admit this process (sending patches and getting it reviewed)
>> could benefit from more clarifications.
>> For example, the process could say that at least 2 reviewers must
>> agree on it (on the comments made to the patch and on the patch
>> itself).
>> I could also say that reviewers are to express not only their opinion
>> but to clearly and unequivocally accept or reject.
>>
>> For instance, right now, it is not clear to me if your comments are
>> "nice to have" or "blocking" the patch.
>> I don't know if the patch is welcome or not, etc.
>> So I submitted v5, but maybe it was not even necessary, it's hard to
>> know where in the submission process we are.
>
> In this case, it's ultimately up to Dave Miller.  He'll take into
> account whatever comments others have made and decide whether he wants
> to accept it.

Ok, thanks.

>
>> By the way, I know some people like the command line, email, etc. but
>> there ought to be other tools better suited for patch review...
>
> Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
> of various patches.
>

Thanks, I see that netdev is part of it, and that the patches are there:

https://patchwork.ozlabs.org/patch/580217/

seems like a slight layer over plain email and mailinglists; I was 
thinking of something more in the line of https://www.gerritcodereview.com/
I believe Google uses Gerrit for Android.
I think Gerrit would probably be too big (and being written in Java, 
using Prolog and other DSLs, implementing its own Git server in Java, 
etc, may make some -or lots?- of kernel developers cry :-) )
However, in Gerrit it is easier to know where in the "review" process we 
are, because people have to explicitly give a score "+/- X" when 
commenting on a patch.
Also, the diff can operate between different versions of the patches 
themselves to see if the inlined comments were addressed.

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 14:11                           ` Mason
@ 2016-02-08 14:38                             ` Sebastian Frias
  2016-02-08 14:44                               ` Måns Rullgård
  0 siblings, 1 reply; 26+ messages in thread
From: Sebastian Frias @ 2016-02-08 14:38 UTC (permalink / raw)
  To: Mason, Mans Rullgard; +Cc: David S. Miller, netdev, LKML

On 02/08/2016 03:11 PM, Mason wrote:
> On 08/02/2016 14:37, Måns Rullgård wrote:
>
>> Sebastian Frias wrote:
>>
>>> By the way, I know some people like the command line, email, etc. but
>>> there ought to be other tools better suited for patch review...
>>
>> Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
>> of various patches.
>
> There's also a kernel bugzilla, but it may be for actual bugs.
> https://bugzilla.kernel.org/
>

Thanks, and what would be the definition of a bug?
I mean, would the issue from this thread qualify?
Should I have created a bug report before submitting the patch?

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 14:38                             ` Sebastian Frias
@ 2016-02-08 14:44                               ` Måns Rullgård
  0 siblings, 0 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-08 14:44 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: Mason, David S. Miller, netdev, LKML

Sebastian Frias <sf84@laposte.net> writes:

> On 02/08/2016 03:11 PM, Mason wrote:
>> On 08/02/2016 14:37, Måns Rullgård wrote:
>>
>>> Sebastian Frias wrote:
>>>
>>>> By the way, I know some people like the command line, email, etc. but
>>>> there ought to be other tools better suited for patch review...
>>>
>>> Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
>>> of various patches.
>>
>> There's also a kernel bugzilla, but it may be for actual bugs.
>> https://bugzilla.kernel.org/
>>
>
> Thanks, and what would be the definition of a bug?
> I mean, would the issue from this thread qualify?
> Should I have created a bug report before submitting the patch?

No, that is not necessary.  My understanding is that the bugzilla is
more of a place to report a bug you've found but don't have a patch
for.  Patches always go through the mailing lists.

-- 
Måns Rullgård

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

* Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver
  2016-02-08 14:32                           ` Sebastian Frias
@ 2016-02-08 14:50                             ` Måns Rullgård
  0 siblings, 0 replies; 26+ messages in thread
From: Måns Rullgård @ 2016-02-08 14:50 UTC (permalink / raw)
  To: Sebastian Frias; +Cc: David S. Miller, netdev, LKML, mason

Sebastian Frias <sf84@laposte.net> writes:

>>> By the way, I know some people like the command line, email, etc. but
>>> there ought to be other tools better suited for patch review...
>>
>> Some kernel subsystems use http://patchwork.ozlabs.org/ to track status
>> of various patches.
>>
>
> Thanks, I see that netdev is part of it, and that the patches are there:
>
> https://patchwork.ozlabs.org/patch/580217/
>
> seems like a slight layer over plain email and mailinglists; I was
> thinking of something more in the line of
> https://www.gerritcodereview.com/
> I believe Google uses Gerrit for Android.
> I think Gerrit would probably be too big (and being written in Java,
> using Prolog and other DSLs, implementing its own Git server in Java,
> etc, may make some -or lots?- of kernel developers cry :-) )
> However, in Gerrit it is easier to know where in the "review" process
> we are, because people have to explicitly give a score "+/- X" when
> commenting on a patch.
> Also, the diff can operate between different versions of the patches
> themselves to see if the inlined comments were addressed.

Gerrit has some merits, but for seasoned developers it's largely a
nuisance.  It's probably good at keeping junior/undisciplined developers
from doing too much damage by strictly enforcing a cumbersome process.

-- 
Måns Rullgård

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

* Re: [PATCH v5] net: ethernet: nb8800: support fixed-link DT node
  2016-02-08 10:23                       ` [PATCH v5] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
  2016-02-08 13:19                         ` Måns Rullgård
@ 2016-02-16 20:04                         ` David Miller
  2016-02-22 12:39                           ` Mason
  1 sibling, 1 reply; 26+ messages in thread
From: David Miller @ 2016-02-16 20:04 UTC (permalink / raw)
  To: sf84; +Cc: mans, netdev, linux-kernel, slash.tmp

From: Sebastian Frias <sf84@laposte.net>
Date: Mon, 08 Feb 2016 11:23:04 +0100

> 
> Under some circumstances, for example when connecting
> to a switch:
> 
> https://stackoverflow.com/questions/31046172/device-tree-for-phy-less-connection-to-a-dsa-switch
> 
> the ethernet port will not be connected to a PHY.
> In that case a "fixed-link" DT node can be used to replace it.
> 
> This patch adds support for the "fixed-link" node to the
> nb8800 driver.
> 
> Signed-off-by: Sebastian Frias <sf84@laposte.net>

This doesn't apply, please respin against my tree.

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

* Re: [PATCH v5] net: ethernet: nb8800: support fixed-link DT node
  2016-02-16 20:04                         ` David Miller
@ 2016-02-22 12:39                           ` Mason
  0 siblings, 0 replies; 26+ messages in thread
From: Mason @ 2016-02-22 12:39 UTC (permalink / raw)
  To: David Miller, Sebastian Frias; +Cc: Mans Rullgard, netdev

On 16/02/2016 21:04, David Miller wrote:

> This doesn't apply, please respin against my tree.

I fixed several formatting issues with Sebastian's patch,
and submitted v6.

Regards.

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

end of thread, other threads:[~2016-02-22 12:39 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 13:31 [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
2016-02-05 13:39 ` Måns Rullgård
2016-02-05 13:49   ` [PATCH v2] net: ethernet: support "fixed-link" DT key/node " Sebastian Frias
2016-02-05 13:58     ` Måns Rullgård
2016-02-05 14:08       ` Sebastian Frias
2016-02-05 14:13         ` Måns Rullgård
2016-02-05 14:22           ` [PATCH v3] net: ethernet: support "fixed-link" DT node " Sebastian Frias
2016-02-05 14:34             ` Måns Rullgård
2016-02-05 14:56               ` Sebastian Frias
2016-02-05 15:08                 ` Måns Rullgård
2016-02-05 15:20                   ` Sebastian Frias
2016-02-05 15:26                     ` Måns Rullgård
2016-02-08 10:23                       ` [PATCH v5] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
2016-02-08 13:19                         ` Måns Rullgård
2016-02-16 20:04                         ` David Miller
2016-02-22 12:39                           ` Mason
2016-02-08 10:34                       ` [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver Sebastian Frias
2016-02-08 13:37                         ` Måns Rullgård
2016-02-08 14:11                           ` Mason
2016-02-08 14:38                             ` Sebastian Frias
2016-02-08 14:44                               ` Måns Rullgård
2016-02-08 14:32                           ` Sebastian Frias
2016-02-08 14:50                             ` Måns Rullgård
2016-02-05 14:56               ` [PATCH v4] net: ethernet: nb8800: support fixed-link DT node Sebastian Frias
2016-02-05 15:57   ` [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver Andy Shevchenko
2016-02-05 15:58     ` Måns Rullgård

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.