netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 3c59x.c patch to 2.6.18 fixing Wake on Lan (WOL)
@ 2007-01-15 15:12 Harry Coin
  2007-01-15 16:00 ` Dan Williams
  0 siblings, 1 reply; 7+ messages in thread
From: Harry Coin @ 2007-01-15 15:12 UTC (permalink / raw)
  To: netdev

Hello all.

The 3c59x.c in kernel 2.6.18 (and as I see later ones too) attempts
to enable PME from the already awake D0 state. The PME config space on Dell 
Optiplexs
for this chip has a zero in the capabilities for this bit-- no 'wake from d0'.

The pci_enable_wake in 2.6.18 tests the capabilities before enabling PME,
so the pci_wake call fails, its result is not tested, so no error is reported.

The routine changes the wake request from 0 to D3_hot.  This fix
causes wake on lan (WOL) to work properly on older Dell Optiplex models.

Kindly overlook newbie mistakes.  Thank you.

Harry Coin
Bettendorf, Iowa


--- drivers-orig/3c59x.c        2007-01-15 00:03:52.000000000 -0600
+++ drivers-fixed/3c59x.c       2007-01-15 00:46:37.000000000 -0600
@@ -3090,8 +3090,8 @@
  /* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */
  static void acpi_set_WOL(struct net_device *dev)
  {
-       struct vortex_private *vp = netdev_priv(dev);
-       void __iomem *ioaddr = vp->ioaddr;
+  struct vortex_private *vp = netdev_priv(dev);
+  void __iomem *ioaddr = vp->ioaddr;

         if (vp->enable_wol) {
                 /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 
4==Link Status. */
@@ -3101,7 +3101,7 @@
                 iowrite16(SetRxFilter|RxStation|RxMulticast|RxBroadcast, 
ioaddr + EL3_CMD);
                 iowrite16(RxEnable, ioaddr + EL3_CMD);

-               pci_enable_wake(VORTEX_PCI(vp), 0, 1);
+               pci_enable_wake(VORTEX_PCI(vp),PCI_D3hot,1);

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-15 19:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-15 15:12 3c59x.c patch to 2.6.18 fixing Wake on Lan (WOL) Harry Coin
2007-01-15 16:00 ` Dan Williams
2007-01-15 17:35   ` Harry Coin
2007-01-15 17:43   ` e100.c " Harry Coin
2007-01-15 18:19     ` Auke Kok
2007-01-15 19:24       ` Harry Coin
2007-01-15 19:42         ` Auke Kok

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).