[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20141222.154239.1266616420580493079.davem@davemloft.net>
Date: Mon, 22 Dec 2014 15:42:39 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: chenhc@...ote.com
Cc: peppe.cavallaro@...com, srinivas.kandagatla@...com,
netdev@...r.kernel.org
Subject: Re: [PATCH RESEND] stmmac: Don't init ptp again when resume from
suspend/hibernation
From: Huacai Chen <chenhc@...ote.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@...ote.com>
Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists