* [PATCH] net: PHY: bcm-unimac: Fix clock handling
@ 2020-03-24 16:10 Andre Przywara
2020-03-24 16:17 ` Andrew Lunn
2020-03-24 23:46 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Andre Przywara @ 2020-03-24 16:10 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, Heiner Kallweit
Cc: Russell King, David S . Miller, netdev, linux-kernel, Doug Berger
The DT binding for this PHY describes an *optional* clock property.
Due to a bug in the error handling logic, we are actually ignoring this
clock *all* of the time so far.
Fix this by using devm_clk_get_optional() to handle this clock properly.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/net/phy/mdio-bcm-unimac.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c
index 4a28fb29adaa..fbd36891ee64 100644
--- a/drivers/net/phy/mdio-bcm-unimac.c
+++ b/drivers/net/phy/mdio-bcm-unimac.c
@@ -242,11 +242,9 @@ static int unimac_mdio_probe(struct platform_device *pdev)
return -ENOMEM;
}
- priv->clk = devm_clk_get(&pdev->dev, NULL);
- if (PTR_ERR(priv->clk) == -EPROBE_DEFER)
+ priv->clk = devm_clk_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk);
- else
- priv->clk = NULL;
ret = clk_prepare_enable(priv->clk);
if (ret)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: PHY: bcm-unimac: Fix clock handling
2020-03-24 16:10 [PATCH] net: PHY: bcm-unimac: Fix clock handling Andre Przywara
@ 2020-03-24 16:17 ` Andrew Lunn
2020-03-24 16:26 ` André Przywara
2020-03-24 23:46 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2020-03-24 16:17 UTC (permalink / raw)
To: Andre Przywara
Cc: Florian Fainelli, Heiner Kallweit, Russell King,
David S . Miller, netdev, linux-kernel, Doug Berger
On Tue, Mar 24, 2020 at 04:10:10PM +0000, Andre Przywara wrote:
> The DT binding for this PHY describes an *optional* clock property.
> Due to a bug in the error handling logic, we are actually ignoring this
> clock *all* of the time so far.
>
> Fix this by using devm_clk_get_optional() to handle this clock properly.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Hi Andre
Do you have a fixes: tag for this?
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: PHY: bcm-unimac: Fix clock handling
2020-03-24 16:17 ` Andrew Lunn
@ 2020-03-24 16:26 ` André Przywara
2020-03-24 17:13 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: André Przywara @ 2020-03-24 16:26 UTC (permalink / raw)
To: Andrew Lunn
Cc: Florian Fainelli, Heiner Kallweit, Russell King,
David S . Miller, netdev, linux-kernel, Doug Berger
On 24/03/2020 16:17, Andrew Lunn wrote:
Hi,
> On Tue, Mar 24, 2020 at 04:10:10PM +0000, Andre Przywara wrote:
>> The DT binding for this PHY describes an *optional* clock property.
>> Due to a bug in the error handling logic, we are actually ignoring this
>> clock *all* of the time so far.
>>
>> Fix this by using devm_clk_get_optional() to handle this clock properly.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
> Hi Andre
>
> Do you have a fixes: tag for this?
Should be:
Fixes: b78ac6ecd1b6b ("net: phy: mdio-bcm-unimac: Allow configuring MDIO
clock divider")
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks for that!
Cheers,
Andre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: PHY: bcm-unimac: Fix clock handling
2020-03-24 16:26 ` André Przywara
@ 2020-03-24 17:13 ` Florian Fainelli
0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2020-03-24 17:13 UTC (permalink / raw)
To: André Przywara, Andrew Lunn
Cc: Heiner Kallweit, Russell King, David S . Miller, netdev,
linux-kernel, Doug Berger
On 3/24/2020 9:26 AM, André Przywara wrote:
> On 24/03/2020 16:17, Andrew Lunn wrote:
>
> Hi,
>
>> On Tue, Mar 24, 2020 at 04:10:10PM +0000, Andre Przywara wrote:
>>> The DT binding for this PHY describes an *optional* clock property.
>>> Due to a bug in the error handling logic, we are actually ignoring this
>>> clock *all* of the time so far.
>>>
>>> Fix this by using devm_clk_get_optional() to handle this clock properly.
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>
>> Hi Andre
>>
>> Do you have a fixes: tag for this?
>
> Should be:
> Fixes: b78ac6ecd1b6b ("net: phy: mdio-bcm-unimac: Allow configuring MDIO
> clock divider")
>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
> Thanks for that!
And the subject should be:
net: phy: mdio-bcm-unimac: Fix clock handling
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: PHY: bcm-unimac: Fix clock handling
2020-03-24 16:10 [PATCH] net: PHY: bcm-unimac: Fix clock handling Andre Przywara
2020-03-24 16:17 ` Andrew Lunn
@ 2020-03-24 23:46 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2020-03-24 23:46 UTC (permalink / raw)
To: andre.przywara
Cc: andrew, f.fainelli, hkallweit1, linux, netdev, linux-kernel, opendmb
From: Andre Przywara <andre.przywara@arm.com>
Date: Tue, 24 Mar 2020 16:10:10 +0000
> The DT binding for this PHY describes an *optional* clock property.
> Due to a bug in the error handling logic, we are actually ignoring this
> clock *all* of the time so far.
>
> Fix this by using devm_clk_get_optional() to handle this clock properly.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Applied with Fixes tag added and Subject line corrected.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-24 23:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 16:10 [PATCH] net: PHY: bcm-unimac: Fix clock handling Andre Przywara
2020-03-24 16:17 ` Andrew Lunn
2020-03-24 16:26 ` André Przywara
2020-03-24 17:13 ` Florian Fainelli
2020-03-24 23:46 ` 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.