All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: phy: Do not perform software reset for Generic PHY
@ 2017-03-05 20:26 Florian Fainelli
  2017-03-05 20:33 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2017-03-05 20:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, andrew, nbd, john, cphealy, Florian Fainelli

The Generic PHY driver is a catch-all PHY driver and it should preserve
whatever prior initialization has been done by boot loader or firmware
agents. For specific PHY device configuration it is expected that a
specialized PHY driver would take over that role.

Resetting the generic PHY was a bad idea that has lead to several
complaints and downstream workarounds e.g: in OpenWrt/LEDE so restore
the behavior prior to 87aa9f9c61ad ("net: phy: consolidate PHY
reset in phy_init_hw()").

Reported-by: Felix Fietkau <nbd@nbd.name>
Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index daec6555f3b1..5198ccfa347f 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = {
 	.phy_id		= 0xffffffff,
 	.phy_id_mask	= 0xffffffff,
 	.name		= "Generic PHY",
-	.soft_reset	= genphy_soft_reset,
+	.soft_reset	= genphy_no_soft_reset,
 	.config_init	= genphy_config_init,
 	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
 			  SUPPORTED_AUI | SUPPORTED_FIBRE |
-- 
2.9.3

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

* Re: [PATCH net] net: phy: Do not perform software reset for Generic PHY
  2017-03-05 20:26 [PATCH net] net: phy: Do not perform software reset for Generic PHY Florian Fainelli
@ 2017-03-05 20:33 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2017-03-05 20:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, andrew, nbd, john, cphealy

Le 03/05/17 à 12:26, Florian Fainelli a écrit :
> The Generic PHY driver is a catch-all PHY driver and it should preserve
> whatever prior initialization has been done by boot loader or firmware
> agents. For specific PHY device configuration it is expected that a
> specialized PHY driver would take over that role.
> 
> Resetting the generic PHY was a bad idea that has lead to several
> complaints and downstream workarounds e.g: in OpenWrt/LEDE so restore
> the behavior prior to 87aa9f9c61ad ("net: phy: consolidate PHY
> reset in phy_init_hw()").
> 
> Reported-by: Felix Fietkau <nbd@nbd.name>
> Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

And I forgot to include include/linux/phy.h in the patch so it won't
build, v2 coming.

> ---
>  drivers/net/phy/phy_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index daec6555f3b1..5198ccfa347f 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -1864,7 +1864,7 @@ static struct phy_driver genphy_driver[] = {
>  	.phy_id		= 0xffffffff,
>  	.phy_id_mask	= 0xffffffff,
>  	.name		= "Generic PHY",
> -	.soft_reset	= genphy_soft_reset,
> +	.soft_reset	= genphy_no_soft_reset,
>  	.config_init	= genphy_config_init,
>  	.features	= PHY_GBIT_FEATURES | SUPPORTED_MII |
>  			  SUPPORTED_AUI | SUPPORTED_FIBRE |
> 


-- 
Florian

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

end of thread, other threads:[~2017-03-05 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-05 20:26 [PATCH net] net: phy: Do not perform software reset for Generic PHY Florian Fainelli
2017-03-05 20:33 ` Florian Fainelli

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.