From: Florian Fainelli <f.fainelli@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Marc Gonzalez <marc_gonzalez@sigmadesigns.com>,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>,
opendmb@gmail.com, Mason <slash.tmp@free.fr>,
David Daney <david.daney@cavium.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [RFC net-next 4/4] net: phy: Correctly process PHY_HALTED in phy_stop_machine()
Date: Tue, 31 Oct 2017 09:33:14 -0700 [thread overview]
Message-ID: <ac2a67f2-8933-2bc9-145a-9e017a5dfddc@gmail.com> (raw)
In-Reply-To: <CAMuHMdXM_=Zj9AKUMhXNbC=27_X0XCn=h+aYFW1Gq03mHOqYhQ@mail.gmail.com>
On 10/31/2017 08:26 AM, Geert Uytterhoeven wrote:
> Hi Florian,
>
> On Mon, Oct 30, 2017 at 5:09 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> On 10/30/2017 06:56 AM, Geert Uytterhoeven wrote:
>>> On Thu, Oct 26, 2017 at 1:21 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>> Marc reported that he was not getting the PHY library adjust_link()
>>>> callback function to run when calling phy_stop() + phy_disconnect()
>>>> which does not indeed happen because we set the state machine to
>>>> PHY_HALTED but we don't get to run it to process this state past that
>>>> point.
>>>>
>>>> Fix this with a synchronous call to phy_state_machine() in order to have
>>>> the state machine actually act on PHY_HALTED, set the PHY device's link
>>>> down, turn the network device's carrier off and finally call the
>>>> adjust_link() function.
>>>>
>>>> At the end of phy_state_machine() though, if we are going to be moving
>>>> from PHY_HALTED to PHY_HALTED, do not reschedule the state machine, this
>>>> is pointless.
>>>>
>>>> Reported-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
>>>> Fixes: a390d1f379cf ("phylib: convert state_queue work to delayed_work")
>>>> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
>>>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>>>
>>> Thanks for your patch!
>>>
>>> Unfortunately, after applying this one, the last in your series, both
>>> sh73a0/kzm9g and r8a73a4/ape6evm start crashing again in the system
>>> suspend/resume path, due to register accesses while the device is already
>>> suspended:
>>
>> OK, seems like there is another path, uncovered by this patch that we
>> can be hitting, does the following patch below help?
>
> Unfortunately it doesn't help.
OK :/
>
>>> Unhandled fault: imprecise external abort (0x1406) at 0x0005b950
>
> Note that this is an imprecise external abort, i.e. it's reporting may
> be delayed,
> and the backtrace may be inaccurate.
True, can you help narrow it down with me? Can you confirm that
adjust_link() (assuming that is the problem) does not get called past
phy_stop_machine() as it should?
--
Florian
next prev parent reply other threads:[~2017-10-31 16:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 23:21 [RFC net-next 0/4] net: phy: PHY_HALTED, the return of the state Florian Fainelli
2017-10-25 23:21 ` [RFC net-next 1/4] net: phy: Export phy_stop_machine() Florian Fainelli
2017-10-30 13:44 ` Geert Uytterhoeven
2017-10-25 23:21 ` [RFC net-next 2/4] net: smsc911x: Properly manage PHY during suspend/resume Florian Fainelli
2017-10-30 13:45 ` Geert Uytterhoeven
2017-10-25 23:21 ` [RFC net-next 3/4] net: phy: Force PHY_HALTED during phy_disconnect() Florian Fainelli
2017-10-25 23:21 ` [RFC net-next 4/4] net: phy: Correctly process PHY_HALTED in phy_stop_machine() Florian Fainelli
2017-10-30 13:56 ` Geert Uytterhoeven
2017-10-30 16:09 ` Florian Fainelli
2017-10-31 15:26 ` Geert Uytterhoeven
2017-10-31 16:33 ` Florian Fainelli [this message]
2017-11-06 15:50 ` Geert Uytterhoeven
2017-11-27 4:05 ` Florian Fainelli
2017-11-27 7:48 ` Geert Uytterhoeven
2017-12-04 15:08 ` Marc Gonzalez
2017-10-27 11:35 ` [RFC net-next 0/4] net: phy: PHY_HALTED, the return of the state Andrew Lunn
2017-10-30 15:44 ` Marc Gonzalez
2017-10-30 16:27 ` David Daney
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=ac2a67f2-8933-2bc9-145a-9e017a5dfddc@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=marc_gonzalez@sigmadesigns.com \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=slash.tmp@free.fr \
/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 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).