linux/drivers/net/ethernet/stmicro/stmmac
Huacai Chen fe13192911 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>
2014-12-22 15:42:13 -05:00
..
chain_mode.c stmmac: fix dma api misuse 2014-08-29 19:54:36 -07:00
common.h stmmac: document common header file 2014-11-19 15:04:57 -05:00
descs_com.h
descs.h
dwmac100_core.c net: stmmac: Support devicetree configs for mcast and ucast filter entries 2014-07-31 14:13:29 -07:00
dwmac100_dma.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac100.h
dwmac1000_core.c stmmac: correct mc_filter local variable in set_filter and set_mac_addr call 2014-10-10 14:48:02 -04:00
dwmac1000_dma.c stmmac: remove BUS_MODE_DA 2014-11-05 16:14:43 -05:00
dwmac1000.h stmmac: prevent false carrier sense detection 2014-08-29 19:54:36 -07:00
dwmac_dma.h stmicro: Remove extern from function prototypes 2013-09-24 12:54:08 -07:00
dwmac_lib.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
dwmac-meson.c stmmac: platform: fix sparse warnings 2014-11-07 12:25:23 -05:00
dwmac-socfpga.c stmmac: platform: fix sparse warnings 2014-11-07 12:25:23 -05:00
dwmac-sti.c net: stmmac: sti: Fix uninitialized pointer dereference if !OF 2014-12-15 11:48:02 -05:00
dwmac-sunxi.c stmmac: review driver when run kernel-doc 2014-11-19 15:04:58 -05:00
enh_desc.c net: stmmac: Correct duplicate if/then/else case found by cppcheck 2014-07-02 18:37:54 -07:00
Kconfig stmmac: split to core library and probe drivers 2014-11-11 14:34:39 -05:00
Makefile stmmac: split to core library and probe drivers 2014-11-11 14:34:39 -05:00
mmc_core.c stmmac: fix tipo on mmc crc error 2014-08-29 19:54:36 -07:00
mmc.h stmmac: fix tipo on mmc crc error 2014-08-29 19:54:36 -07:00
norm_desc.c stmmac: dity-up and rework the driver debug levels 2013-07-02 16:04:53 -07:00
ring_mode.c stmmac: fix dma api misuse 2014-08-29 19:54:36 -07:00
stmmac_ethtool.c stmmac: fix max coal timer parameter 2014-12-09 13:25:18 -05:00
stmmac_hwtstamp.c driver:stmmac: Adjust time stamp increase for 0.465 ns accurate only when Time stamp binary rollover is set. 2013-09-04 14:37:02 -04:00
stmmac_main.c stmmac: Don't init ptp again when resume from suspend/hibernation 2014-12-22 15:42:13 -05:00
stmmac_mdio.c drivers/net: Convert remaining uses of pr_warning to pr_warn 2014-09-09 20:37:08 -07:00
stmmac_pci.c stmmac: pci: allocate memory resources dynamically 2014-12-05 21:03:48 -08:00
stmmac_platform.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
stmmac_platform.h stmmac: platform: fix sparse warnings 2014-11-07 12:25:23 -05:00
stmmac_ptp.c stmmac: set ptp_clock to NULL while unregister 2014-08-25 15:33:10 -07:00
stmmac_ptp.h stmmac: ptp: fix the reference clock 2014-08-29 19:54:36 -07:00
stmmac.h stmmac: split to core library and probe drivers 2014-11-11 14:34:39 -05:00