All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081
@ 2022-01-07 14:30 Wadim Egorov
  2022-01-07 16:25 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Wadim Egorov @ 2022-01-07 14:30 UTC (permalink / raw)
  To: stable; +Cc: gregkh

From: Christian Melki <christian.melki@t2data.com>

commit 764d31cacfe48440745c4bbb55a62ac9471c9f19 upstream.

Following a similar reinstate for the KSZ9031.

Older kernels would use the genphy_soft_reset if the PHY did not implement
a .soft_reset.

Bluntly removing that default may expose a lot of situations where various
PHYs/board implementations won't recover on various changes.
Like with this implementation during a 4.9.x to 5.4.x LTS transition.
I think it's a good thing to remove unwanted soft resets but wonder if it
did open a can of worms?

Atleast this fixes one iMX6 FEC/RMII/8081 combo.

Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
Signed-off-by: Christian Melki <christian.melki@t2data.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210224205536.9349-1-christian.melki@t2data.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 drivers/net/phy/micrel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 0b61d80ea3f8..18cc5e4280e8 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1096,6 +1096,7 @@ static struct phy_driver ksphy_driver[] = {
 	.probe		= kszphy_probe,
 	.config_init	= ksz8081_config_init,
 	.ack_interrupt	= kszphy_ack_interrupt,
+	.soft_reset	= genphy_soft_reset,
 	.config_intr	= kszphy_config_intr,
 	.get_sset_count = kszphy_get_sset_count,
 	.get_strings	= kszphy_get_strings,
-- 
2.25.1


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

* Re: [PATCH 5.4] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081
  2022-01-07 14:30 [PATCH 5.4] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081 Wadim Egorov
@ 2022-01-07 16:25 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-01-07 16:25 UTC (permalink / raw)
  To: Wadim Egorov; +Cc: stable

On Fri, Jan 07, 2022 at 03:30:43PM +0100, Wadim Egorov wrote:
> From: Christian Melki <christian.melki@t2data.com>
> 
> commit 764d31cacfe48440745c4bbb55a62ac9471c9f19 upstream.
> 
> Following a similar reinstate for the KSZ9031.
> 
> Older kernels would use the genphy_soft_reset if the PHY did not implement
> a .soft_reset.
> 
> Bluntly removing that default may expose a lot of situations where various
> PHYs/board implementations won't recover on various changes.
> Like with this implementation during a 4.9.x to 5.4.x LTS transition.
> I think it's a good thing to remove unwanted soft resets but wonder if it
> did open a can of worms?
> 
> Atleast this fixes one iMX6 FEC/RMII/8081 combo.
> 
> Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Link: https://lore.kernel.org/r/20210224205536.9349-1-christian.melki@t2data.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
> ---
>  drivers/net/phy/micrel.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 0b61d80ea3f8..18cc5e4280e8 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -1096,6 +1096,7 @@ static struct phy_driver ksphy_driver[] = {
>  	.probe		= kszphy_probe,
>  	.config_init	= ksz8081_config_init,
>  	.ack_interrupt	= kszphy_ack_interrupt,
> +	.soft_reset	= genphy_soft_reset,
>  	.config_intr	= kszphy_config_intr,
>  	.get_sset_count = kszphy_get_sset_count,
>  	.get_strings	= kszphy_get_strings,
> -- 
> 2.25.1
> 

Now queued up, thanks.

greg k-h

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

end of thread, other threads:[~2022-01-07 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 14:30 [PATCH 5.4] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081 Wadim Egorov
2022-01-07 16:25 ` Greg KH

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.