Denis Kirjanov 84176b7b56 3c59x: Remove atomic context inside vortex_{set|get}_wol
There is no need to use spinlocks in vortex_{set|get}_wol.
This also fixes a bug:
[  254.214993] 3c59x 0000:00:0d.0: PME# enabled
[  254.215021] BUG: sleeping function called from invalid context at kernel/mutex.c:94
[  254.215030] in_atomic(): 0, irqs_disabled(): 1, pid: 4875, name: ethtool
[  254.215042] Pid: 4875, comm: ethtool Tainted: G        W   2.6.36-rc3+ #7
[  254.215049] Call Trace:
[  254.215050]  [] __might_sleep+0xb1/0xb6
[  254.215050]  [] mutex_lock+0x17/0x30
[  254.215050]  [] acpi_enable_wakeup_device_power+0x2b/0xb1
[  254.215050]  [] acpi_pm_device_sleep_wake+0x42/0x7f
[  254.215050]  [] acpi_pci_sleep_wake+0x5d/0x63
[  254.215050]  [] platform_pci_sleep_wake+0x1d/0x20
[  254.215050]  [] __pci_enable_wake+0x90/0xd0
[  254.215050]  [] acpi_set_WOL+0x8e/0xf5 [3c59x]
[  254.215050]  [] vortex_set_wol+0x4e/0x5e [3c59x]
[  254.215050]  [] dev_ethtool+0x1cf/0xb61
[  254.215050]  [] ? debug_mutex_free_waiter+0x45/0x4a
[  254.215050]  [] ? __mutex_lock_common+0x204/0x20e
[  254.215050]  [] ? __mutex_lock_slowpath+0x12/0x15
[  254.215050]  [] ? mutex_lock+0x23/0x30
[  254.215050]  [] dev_ioctl+0x42c/0x533
[  254.215050]  [] ? _cond_resched+0x8/0x1c
[  254.215050]  [] ? lock_page+0x1c/0x30
[  254.215050]  [] ? page_address+0x15/0x7c
[  254.215050]  [] ? filemap_fault+0x187/0x2c4
[  254.215050]  [] sock_ioctl+0x1d4/0x1e0
[  254.215050]  [] ? sock_ioctl+0x0/0x1e0
[  254.215050]  [] vfs_ioctl+0x19/0x33
[  254.215050]  [] do_vfs_ioctl+0x424/0x46f
[  254.215050]  [] ? selinux_file_ioctl+0x3c/0x40
[  254.215050]  [] sys_ioctl+0x40/0x5a
[  254.215050]  [] sysenter_do_call+0x12/0x22

vortex_set_wol protected with a spinlock, but nested  acpi_set_WOL acquires a mutex inside atomic context.
Ethtool operations are already serialized by RTNL mutex, so it is safe to drop the locks.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-15 14:32:39 -07:00
..
2010-06-03 03:18:23 -07:00
2010-08-24 12:21:13 -07:00
2010-08-02 16:26:44 -07:00
2010-05-10 05:01:31 -07:00
2010-08-23 20:28:55 -07:00
2010-08-23 20:28:55 -07:00
2010-09-07 13:57:14 -07:00
2009-09-01 01:13:50 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-16 18:05:05 +02:00
2010-06-03 03:18:23 -07:00
2010-07-19 15:27:13 -07:00
2010-07-11 18:15:08 -07:00
2010-05-10 05:01:31 -07:00
2010-07-11 18:15:08 -07:00
2010-05-10 05:01:31 -07:00
2010-07-08 23:42:40 -07:00
2010-07-19 20:30:07 -07:00
2010-07-14 13:36:18 -07:00
2010-02-26 02:10:14 -08:00
2010-06-25 20:37:21 -07:00
2010-07-19 13:32:57 -07:00
2010-07-14 13:40:36 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-03 03:18:23 -07:00
2009-11-11 19:22:21 -08:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 22:47:34 -07:00
2010-07-14 17:57:19 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 22:47:34 -07:00
2010-03-18 21:14:00 -07:00
2010-07-27 22:24:37 -07:00
2010-09-08 21:47:13 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-21 13:40:25 -07:00
2010-07-05 20:08:05 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-28 12:41:33 -07:00
2010-05-10 05:01:31 -07:00
2010-08-04 21:53:17 -07:00
2010-08-04 21:53:17 -07:00
2010-08-04 21:53:17 -07:00
2010-05-10 05:01:31 -07:00
2010-09-01 14:29:34 -07:00
2010-07-21 21:10:49 -07:00
2010-05-10 05:01:31 -07:00
2010-07-15 20:46:22 -07:00
2010-07-23 13:05:13 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-08-19 00:39:45 -07:00
2010-06-03 03:18:23 -07:00
2010-05-17 22:47:34 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-07-14 12:17:35 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-03 03:18:23 -07:00
2010-08-02 15:46:33 -07:00
2010-08-02 15:46:33 -07:00
2010-05-10 05:01:31 -07:00
2010-04-14 16:11:33 -07:00
2010-06-03 03:18:23 -07:00
2010-06-03 03:18:23 -07:00
2010-05-10 05:01:31 -07:00
2010-07-14 17:53:18 -07:00