tg3: Do not call device_set_wakeup_enable() under spin_lock_bh
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 25 Oct 2010 13:01:55 +0000 (13:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2010 18:34:09 +0000 (11:34 -0700)
commitf2dc0d1809ab7e0147c7e4ac837be1682f706538
tree1b97e8fda5b7893cf3e227f091b91c92e8cc8334
parent78fd9c4491a9c4cf8b401f1c5a516d3d28d3b42b
tg3: Do not call device_set_wakeup_enable() under spin_lock_bh

The tg3 driver calls device_set_wakeup_enable() under spin_lock_bh,
which causes a problem to happen after the recent core power
management changes, because this function can sleep now.  Fix this
by moving the device_set_wakeup_enable() call out of the
spin_lock_bh-protected area.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c