Skip to content

Commit

Permalink
WOL bugfix for 3c59x.c
Browse files Browse the repository at this point in the history
Some NICs (3c905B) can not generate PME in power state PCI_D0, while others
like 3c905C can.  Call pci_enable_wake() with PCI_D3hot should give proper
WOL for 3c905B.

Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Tested-by: Harry Coin <hcoin@n4comm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Steffen Klassert authored and Jeff Garzik committed Oct 17, 2007
1 parent d0cab89 commit 1a1769f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,13 @@ static void acpi_set_WOL(struct net_device *dev)
iowrite16(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
iowrite16(RxEnable, ioaddr + EL3_CMD);

pci_enable_wake(VORTEX_PCI(vp), 0, 1);
if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) {
printk(KERN_INFO "%s: WOL not supported.\n",
pci_name(VORTEX_PCI(vp)));

vp->enable_wol = 0;
return;
}

/* Change the power state to D3; RxEnable doesn't take effect. */
pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
Expand Down

0 comments on commit 1a1769f

Please sign in to comment.