lkml.org 
[lkml]   [2015]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] net: phy: Stop 'phy-state-machine' and 'phy_change' work on remove
On Tue, Oct 27, 2015 at 08:57:58AM -0700, Florian Fainelli wrote:
> (don't top post please)
>
> On 27/10/15 08:53, Frode Isaksen wrote:
> > What will you need in the oops ? I presume you don' want everything or ?
> >
> > The PHY state machine is not stopped with a PHY disconnect.
>
> It is stopped with a phy_disconnect():
>
> /**
> * phy_disconnect - disable interrupts, stop state machine, and detach a PHY
> * device
> * @phydev: target phy_device struct
> */
> void phy_disconnect(struct phy_device *phydev)
> {
> if (phydev->irq > 0)
> phy_stop_interrupts(phydev);
>
> phy_stop_machine(phydev);
>
> phydev->adjust_link = NULL;
>
> phy_detach(phydev);
> }

And this does not yet get called. It probably needs to be in
dsa_switch_destroy() just before unregister_netdev() of the slave
devices.

However, the ordering in dsa_switch_destroy() looks wrong. The fixed
phys are destroyed before the slave devices. They should probably be
destroyed after the slave devices, or at least after the
phy_disconnect() is called.

Andrew


\
 
 \ /
  Last update: 2015-10-27 22:41    [W:0.078 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site