Skip to contentSkip to conversation

net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081

PATCH In review Wadim Egorov 2 participants 2 messages Jan 7, 2022 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081

From: Christian Melki <[email protected]>

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.

---
 drivers/net/phy/micrel.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/micrel.c +1 -0
index 0b61d80ea3f8..18cc5e4280e8 100644
@@ -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,
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 42 lines · Wadim Egorov

From: Christian Melki <[email protected]>

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.

---
 drivers/net/phy/micrel.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/micrel.c +1 -0
index 0b61d80ea3f8..18cc5e4280e8 100644
@@ -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,
Signature · 1 line
2.25.1

Now queued up, thanks.

greg k-h