Skip to content

Commit

Permalink
r8169: fix sleeping while holding spinlock.
Browse files Browse the repository at this point in the history
As device_set_wakeup_enable can now sleep, move the call to outside
the critical section.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
françois romieu authored and David S. Miller committed Nov 9, 2010
1 parent 53f5735 commit ea80907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,10 @@ static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
else
tp->features &= ~RTL_FEATURE_WOL;
__rtl8169_set_wol(tp, wol->wolopts);
device_set_wakeup_enable(&tp->pci_dev->dev, wol->wolopts);

spin_unlock_irq(&tp->lock);

device_set_wakeup_enable(&tp->pci_dev->dev, wol->wolopts);

return 0;
}

Expand Down

0 comments on commit ea80907

Please sign in to comment.