Re: smsc9511: Register access happens after unregistration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2022-03-04 at 15:11 +0100, Andrew Lunn wrote:
> On Fri, Mar 04, 2022 at 10:58:47AM -0300, Fabio Estevam wrote:
> > Hi Martyn,
> > 
> > On Thu, Mar 3, 2022 at 10:14 AM Fabio Estevam <festevam@xxxxxxxxx>
> > wrote:
> > > 
> > > Hi,
> > > 
> > > On a imx8mm-iotgateway board running kernel 5.17-rc6 I am getting
> > > the following
> > > smsc95xx errors after a 'reboot' command:
> > > 
> > > ci_hdrc ci_hdrc.1: remove, state 1
> > > usb usb2: USB disconnect, device number 1
> > > usb 2-1: USB disconnect, device number 2
> > > usb 2-1.1: USB disconnect, device number 3
> > > smsc95xx 2-1.1:1.0 eth1: unregister 'smsc95xx' usb-ci_hdrc.1-1.1,
> > > smsc95xx USB 2.0 Ethernet
> > > smsc95xx 2-1.1:1.0 eth1: Failed to read reg index 0x00000114: -19
> > > smsc95xx 2-1.1:1.0 eth1: Error reading MII_ACCESS
> > > smsc95xx 2-1.1:1.0 eth1: __smsc95xx_mdio_read: MII is busy
> > > smsc95xx 2-1.1:1.0 eth1: Failed to read reg index 0x00000114: -19
> > > smsc95xx 2-1.1:1.0 eth1: Error reading MII_ACCESS
> > > smsc95xx 2-1.1:1.0 eth1: __smsc95xx_mdio_read: MII is busy
> > > smsc95xx 2-1.1:1.0 eth1: hardware isn't capable of remote wakeup
> > 
> > The same error has been previously reported by Ferry Toth on Intel
> > Edison-Arduino:
> > https://lore.kernel.org/netdev/5cd6fc87-0f8d-0b9b-42be-8180540a94e7@xxxxxxxxx/
> > 
> > It happens after commit a049a30fc27c ("net: usb: Correct PHY
> > handling
> > of smsc95xx")
> > 
> > A simple way to reproduce it:
> > 
> > echo -n "2-1" > /sys/bus/usb/drivers/usb/unbind
> > 
> > It is not clear to me why register 0x114 (MII_ADDR) is accessed
> > after
> > smsc95xx unregistration.
> 
> I suggest you look at the call sequences. When does phy_stop() and
> phy_disconnect() get called? phylib has a work queue which runs once
> per second to poll the PHY and get its status. That polling is
> stopped
> by calling phy_stop(). It is also assumed you can still talk to the
> PHY while performing phy_stop().
> 
> 

I was just trying to remember the details from when I looked at this
driver. IIRC, that's broadly the conclusion I came to and couldn't
really see a way around it. Access to the phy was being lost before
phy_stop() was called.

Martyn

>     Andrew





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux