summaryrefslogtreecommitdiff
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2014-12-19 17:38:18 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-22 23:42:13 +0300
commitfe13192911507c49002fc4882ef11f75f529a010 (patch)
tree09eccc1243ff0f6abdb9e66fb1f31a28974303bb /drivers/net/virtio_net.c
parentda413eec729dae5dcb150e2eb34c5e7e5e4e1b49 (diff)
downloadlinux-fe13192911507c49002fc4882ef11f75f529a010.tar.xz
stmmac: Don't init ptp again when resume from suspend/hibernation
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
0 files changed, 0 insertions, 0 deletions