Skip to contentSkip to conversation

net: usb: Correct reset handling of smsc95xx

PATCH Applied Markus Reichl 3 participants 3 messages Jan 13, 2022 – Jan 14, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: usb: Correct reset handling of smsc95xx

On boards with LAN9514 and no preconfigured MAC address we don't get an ip address from DHCP after commit a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx") anymore. Adding an explicit reset before starting the phy fixes the issue.

[1]
https://lore.kernel.org/netdev/[email protected]/

From: Gabriel Hojda <[email protected]>

Fixes a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx")
---
 drivers/net/usb/smsc95xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/usb/smsc95xx.c +2 -1
index abe0149ed917..bc1e3dd67c04 100644
@@ -1962,7 +1962,8 @@ static const struct driver_info smsc95xx_info = {
 	.bind		= smsc95xx_bind,
 	.unbind		= smsc95xx_unbind,
 	.link_reset	= smsc95xx_link_reset,
-	.reset		= smsc95xx_start_phy,
+	.reset		= smsc95xx_reset,
+	.check_connect	= smsc95xx_start_phy,
 	.stop		= smsc95xx_stop,
 	.rx_fixup	= smsc95xx_rx_fixup,
 	.tx_fixup	= smsc95xx_tx_fixup,
Signature · 1 line
2.30.2
Tested-by on v1 1/1
#1 lore raw

Hi Markus,

Am Donnerstag, 13. Januar 2022, 21:01:11 CET schrieb Markus Reichl:

Quoted 22 lines

On boards with LAN9514 and no preconfigured MAC address we don't get an ip address from DHCP after commit a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx") anymore. Adding an explicit reset before starting the phy fixes the issue.

[1]
https://lore.kernel.org/netdev/199eebbd6b97f52b9119c9fa4fd8504f8a34de18.came
[email protected]/

From: Gabriel Hojda <[email protected]>

Fixes a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx")
---
 drivers/net/usb/smsc95xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/usb/smsc95xx.c +0 -0
index abe0149ed917..bc1e3dd67c04 100644

drivers/net/usb/smsc95xx.c static const struct driver_info smsc95xx_info = { · line 1969

Quoted 9 lines
drivers/net/usb/smsc95xx.c +2 -1
@@ -1962,7 +1962,8 @@ static const struct driver_info smsc95xx_info = {
 	.bind		= smsc95xx_bind,
 	.unbind		= smsc95xx_unbind,
 	.link_reset	= smsc95xx_link_reset,
-	.reset		= smsc95xx_start_phy,
+	.reset		= smsc95xx_reset,
+	.check_connect	= smsc95xx_start_phy,
 	.stop		= smsc95xx_stop,
 	.rx_fixup	= smsc95xx_rx_fixup,
 	.tx_fixup	= smsc95xx_tx_fixup,

This should go into stable-5.15!

Tested on a TQMa6x on MBa6 which uses a SMSC9500 as a second ethernet interface.
For the record: I noticed the problem as ARP replies were sent from the wrong interface. Thus my PC got the wrong MAC address which failed ping in the end.

Best regards,
Alexander

#2 lore raw
In reply to Markus Reichl
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Thu, 13 Jan 2022 21:01:11 +0100 you wrote:

On boards with LAN9514 and no preconfigured MAC address we don't get an ip address from DHCP after commit a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx") anymore. Adding an explicit reset before starting the phy fixes the issue.

[1]
https://lore.kernel.org/netdev/[email protected]/

[...]

Here is the summary with links:
- net: usb: Correct reset handling of smsc95xx

    https://git.kernel.org/netdev/net/c/0bf3885324a8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html