From: David Miller <davem@davemloft.net>
To: f.fainelli@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: systemport: Fix wake-up interrupt race during resume
Date: Tue, 02 Oct 2018 17:35:26 -0700 (PDT) [thread overview]
Message-ID: <20181002.173526.155463905341442781.davem@davemloft.net> (raw)
In-Reply-To: <20181002235204.26135-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 2 Oct 2018 16:52:03 -0700
> The AON_PM_L2 is normally used to trigger and identify the source of a
> wake-up event. Since the RX_SYS clock is no longer turned off, we also
> have an interrupt being sent to the SYSTEMPORT INTRL_2_0 controller, and
> that interrupt remains active up until the magic packet detector is
> disabled which happens much later during the driver resumption.
>
> The race happens if we have a CPU that is entering the SYSTEMPORT
> INTRL2_0 handler during resume, and another CPU has managed to clear the
> wake-up interrupt during bcm_sysport_resume_from_wol(). In that case, we
> have the first CPU stuck in the interrupt handler with an interrupt
> cause that has been cleared under its feet, and so we keep returning
> IRQ_NONE and we never make any progress.
>
> This was not a problem before because we would always turn off the
> RX_SYS clock during WoL, so the SYSTEMPORT INTRL2_0 would also be turned
> off as well, thus not latching the interrupt.
>
> The fix is to make sure we do not enable either the MPD or
> BRCM_TAG_MATCH interrupts since those are redundant with what the
> AON_PM_L2 interrupt controller already processes and they would cause
> such a race to occur.
>
> Fixes: bb9051a2b230 ("net: systemport: Add support for WAKE_FILTER")
> Fixes: 83e82f4c706b ("net: systemport: add Wake-on-LAN support")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks Florian.
prev parent reply other threads:[~2018-10-03 0:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 23:52 [PATCH net] net: systemport: Fix wake-up interrupt race during resume Florian Fainelli
2018-10-03 0:35 ` David Miller [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=20181002.173526.155463905341442781.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 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).