Netdev List
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org,
	klassert@mathematik.tu-chemnitz.de, hcoin@n4comm.com
Subject: [patch 3/4] WOL bugfix for 3c59x.c
Date: Tue, 16 Oct 2007 14:24:09 -0700	[thread overview]
Message-ID: <200710162124.l9GLO9t6017971@imap1.linux-foundation.org> (raw)

From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>

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>
---

 drivers/net/3c59x.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff -puN drivers/net/3c59x.c~wol-bugfix-for-3c59xc drivers/net/3c59x.c
--- a/drivers/net/3c59x.c~wol-bugfix-for-3c59xc
+++ a/drivers/net/3c59x.c
@@ -3118,7 +3118,13 @@ static void acpi_set_WOL(struct net_devi
 		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);
_

             reply	other threads:[~2007-10-16 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16 21:24 akpm [this message]
2007-10-17  1:16 ` [patch 3/4] WOL bugfix for 3c59x.c Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710162124.l9GLO9t6017971@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hcoin@n4comm.com \
    --cc=jeff@garzik.org \
    --cc=klassert@mathematik.tu-chemnitz.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox