Files
linux-legacy/drivers/net
Anton Vorontsov 8e982ef543 phylib: Move workqueue initialization to a proper place
commit 541cd3ee00a4fe975b22fac6a3bc846bacef37f7 ("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-08-10 11:50:22 -05:00
..
2009-04-13 15:16:33 -07:00
2009-07-13 11:11:41 -07:00
2009-06-08 00:21:48 -07:00
2009-07-03 19:10:51 -07:00
2009-07-26 18:50:39 -07:00
2009-05-26 20:35:02 -07:00
2008-12-08 01:14:16 -08:00
2009-05-26 20:35:02 -07:00
2009-05-26 20:35:02 -07:00
2009-07-30 13:27:28 -07:00
2009-05-26 20:35:03 -07:00
2009-07-12 14:20:04 -07:00
2008-11-25 18:12:49 -08:00
2009-04-24 04:45:33 -07:00
2009-05-17 11:59:51 -07:00
2008-11-25 18:25:32 -08:00
2009-04-11 02:53:46 -07:00
2009-07-26 18:50:38 -07:00
2009-01-07 18:10:24 -08:00
2009-12-18 13:43:53 -08:00
2009-07-09 20:32:31 -07:00
2009-04-04 16:51:14 -07:00
2009-03-02 22:32:48 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-03-02 22:32:43 -08:00
2009-08-15 18:50:47 -07:00
2009-08-15 18:50:44 -07:00
2009-07-26 18:53:17 -07:00
2009-07-30 13:27:34 -07:00
2008-11-25 18:23:59 -08:00
2009-07-05 18:03:33 -07:00
2009-02-04 16:43:44 -08:00
2009-09-06 01:41:24 -07:00
2009-02-26 21:02:19 -08:00
2008-11-25 18:24:57 -08:00
2009-04-16 02:20:08 -07:00
2009-05-17 15:19:36 -07:00
2009-01-06 10:47:44 -08:00
2009-06-11 17:23:24 -07:00
2009-10-12 12:40:20 -07:00
2009-05-29 01:46:27 -07:00
2010-08-10 11:50:16 -05:00
2009-05-29 01:51:22 -07:00
2009-06-08 00:20:20 -07:00
2009-07-20 08:23:26 -07:00
2009-07-20 08:23:26 -07:00
2009-03-27 00:46:48 -07:00
2009-04-16 02:20:15 -07:00
2008-11-25 18:24:38 -08:00
2009-04-16 02:20:16 -07:00
2009-06-25 20:06:34 -07:00
2009-04-16 02:20:18 -07:00
2009-04-16 02:20:21 -07:00
2009-04-16 02:20:22 -07:00
2009-03-27 00:46:53 -07:00
2009-03-28 23:37:27 -07:00
2009-06-18 00:29:08 -07:00
2009-08-09 21:45:48 -07:00
2009-07-12 14:20:04 -07:00
2009-07-16 09:14:23 -07:00
2009-07-30 14:19:19 -07:00
2009-07-26 20:18:52 -07:00
2009-04-16 02:20:24 -07:00
2009-04-29 17:32:34 -07:00
2009-08-02 12:20:40 -07:00
2009-01-07 17:56:54 -08:00
2009-04-16 02:20:25 -07:00
2009-05-25 22:49:56 -07:00
2009-12-08 10:22:36 -08:00
2009-01-07 18:09:36 -08:00
2009-12-18 13:43:56 -08:00
2009-04-16 02:20:25 -07:00
2009-03-27 00:46:48 -07:00
2008-11-25 18:25:49 -08:00
2009-07-12 14:20:04 -07:00
2009-06-08 00:21:48 -07:00
2009-01-11 00:06:36 -08:00
2009-04-13 15:16:21 -07:00
2009-01-21 14:02:31 -08:00