linux_dsm_epyc7002/drivers/net/phy
Anton Vorontsov 4f9c85a1b0 phylib: Move workqueue initialization to a proper place
commit 541cd3ee00 ("phylib: Fix deadlock
on resume") caused TI DaVinci EMAC ethernet driver to oops upon resume:

 PM: resume of devices complete after 237.098 msecs
 Restarting tasks ... done.
 kernel BUG at kernel/workqueue.c:354!
 Unable to handle kernel NULL pointer dereference at virtual address 00000000
 [...]
 Backtrace:
 [<c002c598>] (__bug+0x0/0x2c) from [<c0052a54>] (queue_delayed_work_on+0x74/0xf8)
 [<c00529e0>] (queue_delayed_work_on+0x0/0xf8) from [<c0052b30>] (queue_delayed_work+0x2c/0x30)

The oops pops up because TI DaVinci EMAC driver detaches PHY on
suspend and attaches it back on resume. Attaching makes phylib call
phy_start_machine() that initializes a workqueue. On the other hand,
PHY's resume routine will call phy_start_machine() again, and that
will cause the oops since we just destroyed the already scheduled
workqueue.

This patch fixes the issue by moving workqueue initialization to
phy_device_create().

p.s. We don't see this oops with ucc_geth and gianfar drivers because
they perform a fine-grained suspend, i.e. they just stop the PHYs
without detaching.

Reported-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-19 01:59:02 -08:00
..
bcm63xx.c MIPS: BCM63XX: Add integrated ethernet PHY support for phylib. 2009-07-07 19:23:51 -07:00
broadcom.c broadcom: Fix &&/|| confusion in bcm54xx_adjust_rxrefclk() 2010-01-03 22:01:32 -08:00
cicada.c
davicom.c
et1011c.c
fixed.c phy: error handling for platform_device_register_simple() 2009-04-11 01:52:29 -07:00
icplus.c
Kconfig MIPS: BCM63XX: Add integrated ethernet PHY support for phylib. 2009-07-07 19:23:51 -07:00
lxt.c
Makefile MIPS: BCM63XX: Add integrated ethernet PHY support for phylib. 2009-07-07 19:23:51 -07:00
marvell.c phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs 2009-09-11 12:54:38 -07:00
mdio_bus.c phylib: Properly reinitialize PHYs after hibernation 2009-12-30 22:03:42 -08:00
mdio-bitbang.c
mdio-gpio.c net: fix mdio section mismatch warning 2009-11-17 04:04:40 -08:00
national.c
phy_device.c phylib: Move workqueue initialization to a proper place 2010-01-19 01:59:02 -08:00
phy.c phylib: Move workqueue initialization to a proper place 2010-01-19 01:59:02 -08:00
qsemi.c
realtek.c
smsc.c phy: add new LAN8710 and LAN8720 device ids to smsc phy driver 2009-03-23 15:17:31 -07:00
ste10Xp.c
vitesse.c