Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: chenhc@lemote.com
Cc: peppe.cavallaro@st.com, srinivas.kandagatla@st.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH RESEND] stmmac: Don't init ptp again when resume from suspend/hibernation
Date: Mon, 22 Dec 2014 15:42:39 -0500 (EST)	[thread overview]
Message-ID: <20141222.154239.1266616420580493079.davem@davemloft.net> (raw)
In-Reply-To: <1418999898-10298-1-git-send-email-chenhc@lemote.com>

From: Huacai Chen <chenhc@lemote.com>
Date: Fri, 19 Dec 2014 22:38:18 +0800

> Both stmmac_open() and stmmac_resume() call stmmac_hw_setup(), and
> stmmac_hw_setup() call stmmac_init_ptp() unconditionally. However, only
> stmmac_release() calls stmmac_release_ptp(). Since stmmac_suspend()
> doesn't call stmmac_release_ptp(), stmmac_resume() also needn't call
> stmmac_init_ptp().
> 
> This patch also fix a "scheduling while atomic" problem when resume
> from suspend/hibernation. Because stmmac_init_ptp() will trigger
> scheduling while stmmac_resume() hold a spinlock.
> 
> Callgraph of "scheduling while atomic":
> stmmac_resume() --> stmmac_hw_setup() --> stmmac_init_ptp() -->
> stmmac_ptp_register() --> ptp_clock_register() --> device_create() -->
> device_create_groups_vargs() --> device_add() --> devtmpfs_create_node()
> --> wait_for_common() --> schedule_timeout() --> __schedule()
> 
> Signed-off-by: Huacai Chen <chenhc@lemote.com>

Applied, thank you.

      reply	other threads:[~2014-12-22 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 14:38 [PATCH RESEND] stmmac: Don't init ptp again when resume from suspend/hibernation Huacai Chen
2014-12-22 20:42 ` 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=20141222.154239.1266616420580493079.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=chenhc@lemote.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=srinivas.kandagatla@st.com \
    /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