All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Hojda <ghojda@yo2urs.ro>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Martyn Welch <martyn.welch@collabora.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: Issues with smsc95xx driver since a049a30fc27c
Date: Mon, 20 Dec 2021 23:28:52 +0200	[thread overview]
Message-ID: <df29df7d0799cd22c6e30ced02e7c760@yo2urs.ro> (raw)
In-Reply-To: <YcBEgE589cf5DhJd@lunn.ch>

On 2021-12-20 10:53, Andrew Lunn wrote:
>>> next, when i have time and if there's still no progress, i think i 
>>> should
>> try to insert:
>> 
>>         ret = smsc95xx_reset(dev);
>> 	if (ret)
>> 		goto free_pdata;
>> 
>> before
>> 
>> 	ret = phy_connect_direct(dev->net, pdata->phydev,
>> 				 &smsc95xx_handle_link_change,
>> 				 PHY_INTERFACE_MODE_MII);
>> 
>> in smsc95xx_bind() to try to emulate the old behavior for the first 
>> call to
>> start_phy().
> 
> Yes, that will be in interesting experiment. Something in
> smsc95xx_reset() is required.
> 
> 	Andrew

since the above experiment did not work, i studied usbnet_open() in 
usbnet.c which really tries to reset() and then check_connect() ... 
after that i tried following patch which restored network functionality:

-----------------------------------------------------------------------------
--- a/drivers/net/usb/smsc95xx.c        2021-12-17 11:30:17.000000000 
+0200
+++ b/drivers/net/usb/smsc95xx.c        2021-12-20 22:47:30.401385947 
+0200
@@ -1961,7 +1961,8 @@
         .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,
-----------------------------------------------------------------------------

i guess a call to smsc95xx_reset() is needed before phy_start() ...

Gabriel

      parent reply	other threads:[~2021-12-20 21:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 15:45 Issues with smsc95xx driver since a049a30fc27c Martyn Welch
2021-12-18 16:45 ` Andrew Lunn
2021-12-18 17:23   ` Gabriel Hojda
2021-12-18 18:22     ` Andrew Lunn
2021-12-18 18:32       ` Andrew Lunn
2021-12-18 20:33         ` Gabriel Hojda
2021-12-20 10:37           ` Markus Reichl
     [not found]         ` <c95954ec12dfcf8877c1bf92047c0268@yo2urs.ro>
2021-12-20  8:53           ` Andrew Lunn
2021-12-20 20:04             ` Gabriel Hojda
2021-12-20 21:28             ` Gabriel Hojda [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df29df7d0799cd22c6e30ced02e7c760@yo2urs.ro \
    --to=ghojda@yo2urs.ro \
    --cc=andrew@lunn.ch \
    --cc=martyn.welch@collabora.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.