netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, gwilford@gmail.com, degnbol@danbbs.dk
Subject: [PATCH] 3c59x: Use device_set_wakeup_enable
Date: Fri, 9 Jan 2009 14:53:17 +0100	[thread overview]
Message-ID: <20090109135317.GC6473@bayes.mathematik.tu-chemnitz.de> (raw)

Since dev->power.should_wakeup bit is used by the PCI core to
decide whether the device should wake up the system from sleep
states, set this bit by calling device_set_wakeup_enable().

This restores proper WOL for the 3c59x driver.

Reported-and-tested-by: Graeme Wilford <gwilford@gmail.com>
Reported-by: Gunnar Degnbol <degnbol@danbbs.dk>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
---
 drivers/net/3c59x.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 665e7fd..cdbbb62 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -3109,6 +3109,8 @@ static void acpi_set_WOL(struct net_device *dev)
 	struct vortex_private *vp = netdev_priv(dev);
 	void __iomem *ioaddr = vp->ioaddr;
 
+	device_set_wakeup_enable(vp->gendev, vp->enable_wol);
+
 	if (vp->enable_wol) {
 		/* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
 		EL3WINDOW(7);
-- 
1.5.3


             reply	other threads:[~2009-01-09 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 13:53 Steffen Klassert [this message]
2009-01-10  7:09 ` [PATCH] 3c59x: Use device_set_wakeup_enable David Miller

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=20090109135317.GC6473@bayes.mathematik.tu-chemnitz.de \
    --to=klassert@mathematik.tu-chemnitz.de \
    --cc=degnbol@danbbs.dk \
    --cc=gwilford@gmail.com \
    --cc=jgarzik@pobox.com \
    --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;
as well as URLs for NNTP newsgroup(s).