All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m
@ 2016-05-16 18:52 Alexander Graf
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
  2016-05-17 18:22 ` [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Alexander Graf @ 2016-05-16 18:52 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, michal.simek, Dan Murphy, andrew

When CONFIG_OF_MDIO is configured as module, the #define for it really
is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it
as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't
read the dt rgmii parameters.

The fix is simple: Use IS_ENABLED(). It checks for both - module as well
as compiled in code.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 drivers/net/phy/dp83867.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 2afa61b..94cc278 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -99,7 +99,7 @@ static int dp83867_config_intr(struct phy_device *phydev)
 	return phy_write(phydev, MII_DP83867_MICR, micr_status);
 }
 
-#ifdef CONFIG_OF_MDIO
+#if IS_ENABLED(CONFIG_OF_MDIO)
 static int dp83867_of_init(struct phy_device *phydev)
 {
 	struct dp83867_private *dp83867 = phydev->priv;
-- 
1.8.5.6

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

* [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-16 18:52 [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m Alexander Graf
@ 2016-05-16 18:52 ` Alexander Graf
  2016-05-16 19:04   ` Florian Fainelli
                     ` (3 more replies)
  2016-05-17 18:22 ` [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m David Miller
  1 sibling, 4 replies; 12+ messages in thread
From: Alexander Graf @ 2016-05-16 18:52 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, michal.simek, Dan Murphy, andrew

If you compile without OF_MDIO support in an RGMII configuration, we fail
to configure the dp83867 phy today by writing garbage into its configuration
registers.

On the other hand if you do compile with OF_MDIO and the phy gets loaded via
device tree, you have to have the properties set in the device tree, otherwise
we fail to load the driver and don't even attach the generic phy driver to
the interface anymore.

To make things slightly more consistent, make the rgmii configuration properties
optional and allow a user to omit them in their device tree.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 drivers/net/phy/dp83867.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 94cc278..1b01680 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -65,6 +65,7 @@ struct dp83867_private {
 	int rx_id_delay;
 	int tx_id_delay;
 	int fifo_depth;
+	int values_are_sane;
 };
 
 static int dp83867_ack_interrupt(struct phy_device *phydev)
@@ -113,15 +114,30 @@ static int dp83867_of_init(struct phy_device *phydev)
 	ret = of_property_read_u32(of_node, "ti,rx-internal-delay",
 				   &dp83867->rx_id_delay);
 	if (ret)
-		return ret;
+		goto invalid_dt;
 
 	ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
 				   &dp83867->tx_id_delay);
 	if (ret)
-		return ret;
+		goto invalid_dt;
 
-	return of_property_read_u32(of_node, "ti,fifo-depth",
+	ret = of_property_read_u32(of_node, "ti,fifo-depth",
 				   &dp83867->fifo_depth);
+	if (ret)
+		goto invalid_dt;
+
+	dp83867->values_are_sane = 1;
+
+	return 0;
+
+invalid_dt:
+	phydev_err(phydev, "missing properties in device tree");
+
+	/*
+	 * We can still run with a broken dt by not using any of the optional
+	 * parameters, so just don't set dp83867->values_are_sane.
+	 */
+	return 0;
 }
 #else
 static int dp83867_of_init(struct phy_device *phydev)
@@ -150,6 +166,15 @@ static int dp83867_config_init(struct phy_device *phydev)
 		dp83867 = (struct dp83867_private *)phydev->priv;
 	}
 
+	/*
+	 * With no or broken device tree, we don't have the values that we would
+	 * want to configure the phy with. In that case, cross our fingers and
+	 * assume that firmware did everything correctly for us or that we don't
+	 * need them.
+	 */
+	if (!dp83867->values_are_sane)
+		return 0;
+
 	if (phy_interface_is_rgmii(phydev)) {
 		ret = phy_write(phydev, MII_DP83867_PHYCTRL,
 			(dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
-- 
1.8.5.6

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
@ 2016-05-16 19:04   ` Florian Fainelli
  2016-05-16 20:15   ` Andrew Lunn
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2016-05-16 19:04 UTC (permalink / raw)
  To: Alexander Graf, netdev; +Cc: linux-kernel, michal.simek, Dan Murphy, andrew

On 05/16/2016 11:52 AM, Alexander Graf wrote:
> If you compile without OF_MDIO support in an RGMII configuration, we fail
> to configure the dp83867 phy today by writing garbage into its configuration
> registers.
> 
> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
> device tree, you have to have the properties set in the device tree, otherwise
> we fail to load the driver and don't even attach the generic phy driver to
> the interface anymore.
> 
> To make things slightly more consistent, make the rgmii configuration properties
> optional and allow a user to omit them in their device tree.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  drivers/net/phy/dp83867.c | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
> index 94cc278..1b01680 100644
> --- a/drivers/net/phy/dp83867.c
> +++ b/drivers/net/phy/dp83867.c
> @@ -65,6 +65,7 @@ struct dp83867_private {
>  	int rx_id_delay;
>  	int tx_id_delay;
>  	int fifo_depth;
> +	int values_are_sane;

This could be a boolean type.

>  };
>  
>  static int dp83867_ack_interrupt(struct phy_device *phydev)
> @@ -113,15 +114,30 @@ static int dp83867_of_init(struct phy_device *phydev)
>  	ret = of_property_read_u32(of_node, "ti,rx-internal-delay",
>  				   &dp83867->rx_id_delay);
>  	if (ret)
> -		return ret;
> +		goto invalid_dt;
>  
>  	ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
>  				   &dp83867->tx_id_delay);
>  	if (ret)
> -		return ret;
> +		goto invalid_dt;
>  
> -	return of_property_read_u32(of_node, "ti,fifo-depth",
> +	ret = of_property_read_u32(of_node, "ti,fifo-depth",
>  				   &dp83867->fifo_depth);
> +	if (ret)
> +		goto invalid_dt;
> +
> +	dp83867->values_are_sane = 1;
> +
> +	return 0;
> +
> +invalid_dt:
> +	phydev_err(phydev, "missing properties in device tree");

phydev_warn() maybe?

Other than that, this looks okay to me.
-- 
Florian

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
  2016-05-16 19:04   ` Florian Fainelli
@ 2016-05-16 20:15   ` Andrew Lunn
  2016-05-16 20:27   ` Dan Murphy
  2016-05-17 18:22   ` David Miller
  3 siblings, 0 replies; 12+ messages in thread
From: Andrew Lunn @ 2016-05-16 20:15 UTC (permalink / raw)
  To: Alexander Graf; +Cc: netdev, linux-kernel, michal.simek, Dan Murphy

On Mon, May 16, 2016 at 08:52:43PM +0200, Alexander Graf wrote:
> If you compile without OF_MDIO support in an RGMII configuration, we fail
> to configure the dp83867 phy today by writing garbage into its configuration
> registers.
> 
> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
> device tree, you have to have the properties set in the device tree, otherwise
> we fail to load the driver and don't even attach the generic phy driver to
> the interface anymore.
> 
> To make things slightly more consistent, make the rgmii configuration properties
> optional and allow a user to omit them in their device tree.

The binding document actually says they are required. It would be good
to make the binding documentation and the code consistent.

   Andrew

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
  2016-05-16 19:04   ` Florian Fainelli
  2016-05-16 20:15   ` Andrew Lunn
@ 2016-05-16 20:27   ` Dan Murphy
  2016-05-17 18:22   ` David Miller
  3 siblings, 0 replies; 12+ messages in thread
From: Dan Murphy @ 2016-05-16 20:27 UTC (permalink / raw)
  To: Alexander Graf, netdev; +Cc: linux-kernel, michal.simek, andrew

On 05/16/2016 01:52 PM, Alexander Graf wrote:
> If you compile without OF_MDIO support in an RGMII configuration, we fail
> to configure the dp83867 phy today by writing garbage into its configuration
> registers.
>
> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
> device tree, you have to have the properties set in the device tree, otherwise
> we fail to load the driver and don't even attach the generic phy driver to
> the interface anymore.
>
> To make things slightly more consistent, make the rgmii configuration properties
> optional and allow a user to omit them in their device tree.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  drivers/net/phy/dp83867.c | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
> index 94cc278..1b01680 100644
> --- a/drivers/net/phy/dp83867.c
> +++ b/drivers/net/phy/dp83867.c
> @@ -65,6 +65,7 @@ struct dp83867_private {
>  	int rx_id_delay;
>  	int tx_id_delay;
>  	int fifo_depth;
> +	int values_are_sane;
>  };
>  
>  static int dp83867_ack_interrupt(struct phy_device *phydev)
> @@ -113,15 +114,30 @@ static int dp83867_of_init(struct phy_device *phydev)
>  	ret = of_property_read_u32(of_node, "ti,rx-internal-delay",
>  				   &dp83867->rx_id_delay);
>  	if (ret)
> -		return ret;
> +		goto invalid_dt;
>  
>  	ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
>  				   &dp83867->tx_id_delay);
>  	if (ret)
> -		return ret;
> +		goto invalid_dt;

Optional means you may or may not have the entries

I would prefer to wrap the DT reading with the interface type check.

if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
phydev->interface == PHY_INTERFACE_MODE_RGMII_ID  )

 	ret = of_property_read_u32(of_node, "ti,tx-internal-delay",
 				   &dp83867->tx_id_delay);
	if (ret)

goto invalid_dt;

Otherwise this continues to mandate that you need to declare all the DT entries
when in fact you may only have to declare 1.

And if the other interfaces are declared then DT entries are ignored.  And configuring
internal delay is not required per section 8.9 footnote 3 of the data sheet.

Dan



>  
> -	return of_property_read_u32(of_node, "ti,fifo-depth",
> +	ret = of_property_read_u32(of_node, "ti,fifo-depth",
>  				   &dp83867->fifo_depth);
> +	if (ret)
> +		goto invalid_dt;
> +
> +	dp83867->values_are_sane = 1;
> +
> +	return 0;
> +
> +invalid_dt:
> +	phydev_err(phydev, "missing properties in device tree");
> +
> +	/*
> +	 * We can still run with a broken dt by not using any of the optional
> +	 * parameters, so just don't set dp83867->values_are_sane.
> +	 */
> +	return 0;
>  }
>  #else
>  static int dp83867_of_init(struct phy_device *phydev)
> @@ -150,6 +166,15 @@ static int dp83867_config_init(struct phy_device *phydev)
>  		dp83867 = (struct dp83867_private *)phydev->priv;
>  	}
>  
> +	/*
> +	 * With no or broken device tree, we don't have the values that we would
> +	 * want to configure the phy with. In that case, cross our fingers and
> +	 * assume that firmware did everything correctly for us or that we don't
> +	 * need them.
> +	 */
> +	if (!dp83867->values_are_sane)
> +		return 0;
> +
>  	if (phy_interface_is_rgmii(phydev)) {
>  		ret = phy_write(phydev, MII_DP83867_PHYCTRL,
>  			(dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));


-- 
------------------
Dan Murphy

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

* Re: [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m
  2016-05-16 18:52 [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m Alexander Graf
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
@ 2016-05-17 18:22 ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2016-05-17 18:22 UTC (permalink / raw)
  To: agraf; +Cc: netdev, linux-kernel, michal.simek, dmurphy, andrew

From: Alexander Graf <agraf@suse.de>
Date: Mon, 16 May 2016 20:52:42 +0200

> When CONFIG_OF_MDIO is configured as module, the #define for it really
> is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it
> as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't
> read the dt rgmii parameters.
> 
> The fix is simple: Use IS_ENABLED(). It checks for both - module as well
> as compiled in code.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>

Applied.

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
                     ` (2 preceding siblings ...)
  2016-05-16 20:27   ` Dan Murphy
@ 2016-05-17 18:22   ` David Miller
  2016-05-17 18:34     ` Dan Murphy
  3 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2016-05-17 18:22 UTC (permalink / raw)
  To: agraf; +Cc: netdev, linux-kernel, michal.simek, dmurphy, andrew

From: Alexander Graf <agraf@suse.de>
Date: Mon, 16 May 2016 20:52:43 +0200

> If you compile without OF_MDIO support in an RGMII configuration, we fail
> to configure the dp83867 phy today by writing garbage into its configuration
> registers.
> 
> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
> device tree, you have to have the properties set in the device tree, otherwise
> we fail to load the driver and don't even attach the generic phy driver to
> the interface anymore.
> 
> To make things slightly more consistent, make the rgmii configuration properties
> optional and allow a user to omit them in their device tree.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>

Applied.

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-17 18:22   ` David Miller
@ 2016-05-17 18:34     ` Dan Murphy
  2016-05-17 18:48       ` David Miller
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Murphy @ 2016-05-17 18:34 UTC (permalink / raw)
  To: David Miller, agraf; +Cc: netdev, linux-kernel, michal.simek, andrew

David

On 05/17/2016 01:22 PM, David Miller wrote:
> From: Alexander Graf <agraf@suse.de>
> Date: Mon, 16 May 2016 20:52:43 +0200
>
>> If you compile without OF_MDIO support in an RGMII configuration, we fail
>> to configure the dp83867 phy today by writing garbage into its configuration
>> registers.
>>
>> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
>> device tree, you have to have the properties set in the device tree, otherwise
>> we fail to load the driver and don't even attach the generic phy driver to
>> the interface anymore.
>>
>> To make things slightly more consistent, make the rgmii configuration properties
>> optional and allow a user to omit them in their device tree.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
> Applied.

This patch should not have been applied.

I did not believe the implementation was proper for that driver.

It seems my objection to the code was not seen.  Nor was Andrew's point about the DT bindings document

https://patchwork.kernel.org/patch/9105371/

Dan

-- 
------------------
Dan Murphy

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-17 18:34     ` Dan Murphy
@ 2016-05-17 18:48       ` David Miller
  2016-05-17 20:37         ` Alexander Graf
  0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2016-05-17 18:48 UTC (permalink / raw)
  To: dmurphy; +Cc: agraf, netdev, linux-kernel, michal.simek, andrew

From: Dan Murphy <dmurphy@ti.com>
Date: Tue, 17 May 2016 13:34:34 -0500

> David
> 
> On 05/17/2016 01:22 PM, David Miller wrote:
>> From: Alexander Graf <agraf@suse.de>
>> Date: Mon, 16 May 2016 20:52:43 +0200
>>
>>> If you compile without OF_MDIO support in an RGMII configuration, we fail
>>> to configure the dp83867 phy today by writing garbage into its configuration
>>> registers.
>>>
>>> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
>>> device tree, you have to have the properties set in the device tree, otherwise
>>> we fail to load the driver and don't even attach the generic phy driver to
>>> the interface anymore.
>>>
>>> To make things slightly more consistent, make the rgmii configuration properties
>>> optional and allow a user to omit them in their device tree.
>>>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> Applied.
> 
> This patch should not have been applied.
> 
> I did not believe the implementation was proper for that driver.
> 
> It seems my objection to the code was not seen.  Nor was Andrew's point about the DT bindings document
> 
> https://patchwork.kernel.org/patch/9105371/

The discussions around the recent phy patches have been a labrynth that I've
found hard to follow, sorry.

I'll revert these two, sigh....

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-17 18:48       ` David Miller
@ 2016-05-17 20:37         ` Alexander Graf
  2016-05-17 20:40           ` Dan Murphy
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Graf @ 2016-05-17 20:37 UTC (permalink / raw)
  To: David Miller; +Cc: dmurphy, netdev, linux-kernel, michal.simek, andrew

Hi David,

> Am 17.05.2016 um 20:48 schrieb David Miller <davem@davemloft.net>:
> 
> From: Dan Murphy <dmurphy@ti.com>
> Date: Tue, 17 May 2016 13:34:34 -0500
> 
>> David
>> 
>>> On 05/17/2016 01:22 PM, David Miller wrote:
>>> From: Alexander Graf <agraf@suse.de>
>>> Date: Mon, 16 May 2016 20:52:43 +0200
>>> 
>>>> If you compile without OF_MDIO support in an RGMII configuration, we fail
>>>> to configure the dp83867 phy today by writing garbage into its configuration
>>>> registers.
>>>> 
>>>> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
>>>> device tree, you have to have the properties set in the device tree, otherwise
>>>> we fail to load the driver and don't even attach the generic phy driver to
>>>> the interface anymore.
>>>> 
>>>> To make things slightly more consistent, make the rgmii configuration properties
>>>> optional and allow a user to omit them in their device tree.
>>>> 
>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>> Applied.
>> 
>> This patch should not have been applied.
>> 
>> I did not believe the implementation was proper for that driver.
>> 
>> It seems my objection to the code was not seen.  Nor was Andrew's point about the DT bindings document
>> 
>> https://patchwork.kernel.org/patch/9105371/
> 
> The discussions around the recent phy patches have been a labrynth that I've
> found hard to follow, sorry.
> 
> I'll revert these two, sigh....

The first patch is an obvious and correct fix. Discussions were only about the second one (which I'm happy to drop given the rat hole this turned out to be).

Alex

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-17 20:37         ` Alexander Graf
@ 2016-05-17 20:40           ` Dan Murphy
  2016-05-17 20:45             ` Alexander Graf
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Murphy @ 2016-05-17 20:40 UTC (permalink / raw)
  To: Alexander Graf, David Miller; +Cc: netdev, linux-kernel, michal.simek, andrew

On 05/17/2016 03:37 PM, Alexander Graf wrote:
> Hi David,
>
>> Am 17.05.2016 um 20:48 schrieb David Miller <davem@davemloft.net>:
>>
>> From: Dan Murphy <dmurphy@ti.com>
>> Date: Tue, 17 May 2016 13:34:34 -0500
>>
>>> David
>>>
>>>> On 05/17/2016 01:22 PM, David Miller wrote:
>>>> From: Alexander Graf <agraf@suse.de>
>>>> Date: Mon, 16 May 2016 20:52:43 +0200
>>>>
>>>>> If you compile without OF_MDIO support in an RGMII configuration, we fail
>>>>> to configure the dp83867 phy today by writing garbage into its configuration
>>>>> registers.
>>>>>
>>>>> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
>>>>> device tree, you have to have the properties set in the device tree, otherwise
>>>>> we fail to load the driver and don't even attach the generic phy driver to
>>>>> the interface anymore.
>>>>>
>>>>> To make things slightly more consistent, make the rgmii configuration properties
>>>>> optional and allow a user to omit them in their device tree.
>>>>>
>>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>>> Applied.
>>> This patch should not have been applied.
>>>
>>> I did not believe the implementation was proper for that driver.
>>>
>>> It seems my objection to the code was not seen.  Nor was Andrew's point about the DT bindings document
>>>
>>> https://patchwork.kernel.org/patch/9105371/
>> The discussions around the recent phy patches have been a labrynth that I've
>> found hard to follow, sorry.
>>
>> I'll revert these two, sigh....
> The first patch is an obvious and correct fix. Discussions were only about the second one (which I'm happy to drop given the rat hole this turned out to be).

So are you going to abandon the second patch all together?
If you do, let me know I can submit a patch.

Dan
>
> Alex
>
>


-- 
------------------
Dan Murphy

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

* Re: [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional
  2016-05-17 20:40           ` Dan Murphy
@ 2016-05-17 20:45             ` Alexander Graf
  0 siblings, 0 replies; 12+ messages in thread
From: Alexander Graf @ 2016-05-17 20:45 UTC (permalink / raw)
  To: Dan Murphy; +Cc: David Miller, netdev, linux-kernel, michal.simek, andrew



> Am 17.05.2016 um 22:40 schrieb Dan Murphy <dmurphy@ti.com>:
> 
>> On 05/17/2016 03:37 PM, Alexander Graf wrote:
>> Hi David,
>> 
>>> Am 17.05.2016 um 20:48 schrieb David Miller <davem@davemloft.net>:
>>> 
>>> From: Dan Murphy <dmurphy@ti.com>
>>> Date: Tue, 17 May 2016 13:34:34 -0500
>>> 
>>>> David
>>>> 
>>>>> On 05/17/2016 01:22 PM, David Miller wrote:
>>>>> From: Alexander Graf <agraf@suse.de>
>>>>> Date: Mon, 16 May 2016 20:52:43 +0200
>>>>> 
>>>>>> If you compile without OF_MDIO support in an RGMII configuration, we fail
>>>>>> to configure the dp83867 phy today by writing garbage into its configuration
>>>>>> registers.
>>>>>> 
>>>>>> On the other hand if you do compile with OF_MDIO and the phy gets loaded via
>>>>>> device tree, you have to have the properties set in the device tree, otherwise
>>>>>> we fail to load the driver and don't even attach the generic phy driver to
>>>>>> the interface anymore.
>>>>>> 
>>>>>> To make things slightly more consistent, make the rgmii configuration properties
>>>>>> optional and allow a user to omit them in their device tree.
>>>>>> 
>>>>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>>>> Applied.
>>>> This patch should not have been applied.
>>>> 
>>>> I did not believe the implementation was proper for that driver.
>>>> 
>>>> It seems my objection to the code was not seen.  Nor was Andrew's point about the DT bindings document
>>>> 
>>>> https://patchwork.kernel.org/patch/9105371/
>>> The discussions around the recent phy patches have been a labrynth that I've
>>> found hard to follow, sorry.
>>> 
>>> I'll revert these two, sigh....
>> The first patch is an obvious and correct fix. Discussions were only about the second one (which I'm happy to drop given the rat hole this turned out to be).
> 
> So are you going to abandon the second patch all together?
> If you do, let me know I can submit a patch.

I'm fairly sure you'll be done with it much quicker than me and the real bug I wanted to fix is that the driver broke with OF_MDIO=m ;)

So yes, please take over from here.


Alex

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

end of thread, other threads:[~2016-05-17 20:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 18:52 [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m Alexander Graf
2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
2016-05-16 19:04   ` Florian Fainelli
2016-05-16 20:15   ` Andrew Lunn
2016-05-16 20:27   ` Dan Murphy
2016-05-17 18:22   ` David Miller
2016-05-17 18:34     ` Dan Murphy
2016-05-17 18:48       ` David Miller
2016-05-17 20:37         ` Alexander Graf
2016-05-17 20:40           ` Dan Murphy
2016-05-17 20:45             ` Alexander Graf
2016-05-17 18:22 ` [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m David Miller

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.