Re: Problem with PHY state machine when using interrupts

2017-07-25 Thread Florian Fainelli
On July 25, 2017 4:41:32 AM PDT, Mason wrote: >On 25/07/2017 12:51, Mason wrote: > >> Moving the call to phy_stop() down after all the MAC tear down >> avoids the hang. >> >> As far as I understand, when we are shutting everything down, >> we don't need the phy_state_machine

Re: Problem with PHY state machine when using interrupts

2017-07-25 Thread Mason
On 25/07/2017 12:51, Mason wrote: > Moving the call to phy_stop() down after all the MAC tear down > avoids the hang. > > As far as I understand, when we are shutting everything down, > we don't need the phy_state_machine to run asynchronously. > We can run it synchronously one last time after

Re: Problem with PHY state machine when using interrupts

2017-07-25 Thread Mason
On 25/07/2017 00:39, Florian Fainelli wrote: > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > index d0626bf5c540..652e24b53f3f 100644 > --- a/drivers/net/phy/phy.c > +++ b/drivers/net/phy/phy.c > @@ -968,6 +968,8 @@ void phy_stop(struct phy_device *phydev) > * of

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 03:59 PM, Florian Fainelli wrote: > On 07/24/2017 03:53 PM, Mason wrote: >> On 25/07/2017 00:36, Florian Fainelli wrote: >>> On 07/24/2017 02:20 PM, Mason wrote: On 24/07/2017 21:53, Florian Fainelli wrote: > Well now that I see the possible interrupts generated, I

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 03:53 PM, Mason wrote: > On 25/07/2017 00:36, Florian Fainelli wrote: >> On 07/24/2017 02:20 PM, Mason wrote: >>> On 24/07/2017 21:53, Florian Fainelli wrote: >>> Well now that I see the possible interrupts generated, I indeed don't see how you can get a link down

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Mason
On 25/07/2017 00:36, Florian Fainelli wrote: > On 07/24/2017 02:20 PM, Mason wrote: >> On 24/07/2017 21:53, Florian Fainelli wrote: >> >>> Well now that I see the possible interrupts generated, I indeed don't >>> see how you can get a link down notification unless you somehow force >>> the link

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 03:36 PM, Florian Fainelli wrote: > On 07/24/2017 02:20 PM, Mason wrote: >> On 24/07/2017 21:53, Florian Fainelli wrote: >> >>> Well now that I see the possible interrupts generated, I indeed don't >>> see how you can get a link down notification unless you somehow force >>> the link

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 02:20 PM, Mason wrote: > On 24/07/2017 21:53, Florian Fainelli wrote: > >> Well now that I see the possible interrupts generated, I indeed don't >> see how you can get a link down notification unless you somehow force >> the link down yourself, which would certainly happen in

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Mason
On 24/07/2017 21:53, Florian Fainelli wrote: > Well now that I see the possible interrupts generated, I indeed don't > see how you can get a link down notification unless you somehow force > the link down yourself, which would certainly happen in phy_suspend() > when we set BMCR.pwrdwn, but that

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 12:32 PM, Florian Fainelli wrote: > On 07/24/2017 12:13 PM, Mason wrote: >> On 24/07/2017 18:49, Florian Fainelli wrote: >> >>> On 07/24/2017 08:01 AM, Mason wrote: >>> > When I set the link down via 'ip link set eth0 down' > (as opposed to pulling the Ethernet cable) things

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 12:13 PM, Mason wrote: > On 24/07/2017 18:49, Florian Fainelli wrote: > >> On 07/24/2017 08:01 AM, Mason wrote: >> When I set the link down via 'ip link set eth0 down' (as opposed to pulling the Ethernet cable) things don't happen as expected: The driver's

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Mason
On 24/07/2017 18:49, Florian Fainelli wrote: > On 07/24/2017 08:01 AM, Mason wrote: > >>> When I set the link down via 'ip link set eth0 down' >>> (as opposed to pulling the Ethernet cable) things don't happen as expected: >>> >>> The driver's adjust_link() callback is never called, and doesn't

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Florian Fainelli
On 07/24/2017 08:01 AM, Mason wrote: > On 24/07/2017 13:07, Mason wrote: > >> When I set the link down via 'ip link set eth0 down' >> (as opposed to pulling the Ethernet cable) things don't happen as expected: >> >> The driver's adjust_link() callback is never called, and doesn't >> get a chance

Re: Problem with PHY state machine when using interrupts

2017-07-24 Thread Mason
On 24/07/2017 13:07, Mason wrote: > When I set the link down via 'ip link set eth0 down' > (as opposed to pulling the Ethernet cable) things don't happen as expected: > > The driver's adjust_link() callback is never called, and doesn't > get a chance make some required changes. And when I set

Problem with PHY state machine when using interrupts

2017-07-24 Thread Mason
Hello, When I set the link down via 'ip link set eth0 down' (as opposed to pulling the Ethernet cable) things don't happen as expected: The driver's adjust_link() callback is never called, and doesn't get a chance make some required changes. And when I set the link up again, there is no network