Skip to content

Commit

Permalink
Fix forcedeth hibernate/wake-on-lan problems
Browse files Browse the repository at this point in the history
We currently don't signal the kernel we that this device can wake
the system.  Call device_init_wakeup() to correct this.
Without this device_can_wakeup and device_may_wakeup will return
incorrect values.
Together with the minimized acpi wakeup patch (6/4 ;)), which will
follow in the next mail, this really makes wake-on-lan work for me
as expected (i.e. "ethtool -s eth0 wol g" is sufficient, no
additional magic needed).

Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Tobias Diedrich authored and Jeff Garzik committed Jun 28, 2008
1 parent a9879c4 commit 9a60a82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -5559,6 +5559,11 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
/* set mac address */
nv_copy_mac_to_hw(dev);

/* Workaround current PCI init glitch: wakeup bits aren't
* being set from PCI PM capability.
*/
device_init_wakeup(&pci_dev->dev, 1);

/* disable WOL */
writel(0, base + NvRegWakeUpFlags);
np->wolenabled = 0;
Expand Down

0 comments on commit 9a60a82

Please sign in to comment.