linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: usb: Correct reset handling of smsc95xx
@ 2022-01-13 20:01 Markus Reichl
  2022-01-14  9:46 ` Alexander Stein
  2022-01-14 11:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Reichl @ 2022-01-13 20:01 UTC (permalink / raw)
  To: Steve Glendinning, UNGLinuxDriver, David S. Miller,
	Jakub Kicinski, Martyn Welch
  Cc: Markus Reichl, Gabriel Hojda, netdev, linux-usb, linux-kernel

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.camel@collabora.com/

From: Gabriel Hojda <ghojda@yo2urs.ro>
Fixes: a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx")
Signed-off-by: Gabriel Hojda <ghojda@yo2urs.ro>
Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
---
 drivers/net/usb/smsc95xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index abe0149ed917..bc1e3dd67c04 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -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,
-- 
2.30.2


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

* Re: [PATCH] net: usb: Correct reset handling of smsc95xx
  2022-01-13 20:01 [PATCH] net: usb: Correct reset handling of smsc95xx Markus Reichl
@ 2022-01-14  9:46 ` Alexander Stein
  2022-01-14 11:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2022-01-14  9:46 UTC (permalink / raw)
  To: Steve Glendinning, UNGLinuxDriver, David S. Miller,
	Jakub Kicinski, Martyn Welch, Markus Reichl
  Cc: Markus Reichl, Gabriel Hojda, netdev, linux-usb, linux-kernel

Hi Markus,

Am Donnerstag, 13. Januar 2022, 21:01:11 CET schrieb Markus Reichl:
> 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
> l@collabora.com/
> 
> From: Gabriel Hojda <ghojda@yo2urs.ro>
> Fixes: a049a30fc27c ("net: usb: Correct PHY handling of smsc95xx")
> Signed-off-by: Gabriel Hojda <ghojda@yo2urs.ro>
> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
> ---
>  drivers/net/usb/smsc95xx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
> index abe0149ed917..bc1e3dd67c04 100644
> --- a/drivers/net/usb/smsc95xx.c
> +++ b/drivers/net/usb/smsc95xx.c
> @@ -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,

Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>

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




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

* Re: [PATCH] net: usb: Correct reset handling of smsc95xx
  2022-01-13 20:01 [PATCH] net: usb: Correct reset handling of smsc95xx Markus Reichl
  2022-01-14  9:46 ` Alexander Stein
@ 2022-01-14 11:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-14 11:30 UTC (permalink / raw)
  To: Markus Reichl
  Cc: steve.glendinning, UNGLinuxDriver, davem, kuba, martyn.welch,
	ghojda, netdev, linux-usb, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

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/199eebbd6b97f52b9119c9fa4fd8504f8a34de18.camel@collabora.com/
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-01-14 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 20:01 [PATCH] net: usb: Correct reset handling of smsc95xx Markus Reichl
2022-01-14  9:46 ` Alexander Stein
2022-01-14 11:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).