netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-pm@lists.linux-foundation.org"
	<linux-pm@lists.linux-foundation.org>
Subject: Re: Very strange issues with ethernet wake on lan
Date: Thu, 20 Aug 2009 12:16:55 +0300	[thread overview]
Message-ID: <1250759815.6326.5.camel@localhost.localdomain> (raw)
In-Reply-To: <200908172030.54505.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]

On Mon, 2009-08-17 at 20:30 +0200, Rafael J. Wysocki wrote:
> On Monday 17 August 2009, Maxim Levitsky wrote:
> > On Sun, 2009-08-16 at 06:42 +0300, Maxim Levitsky wrote:
> > > Hi,
> > > 
> > > I have recently put back the davicom dm9009 ethernet card into my
> > > computer.
> > > 
> > > Some long time ago, I have written its suspend/resume routines.
> > > Now I see that few things have changed, like I need to enable wake in
> > > sysfs or better patch the code to do so, some nice helpers like
> > > pci_prepare_to_sleep have arrived, etc.
> > > 
> > > 
> > > I narrowed the strange issue down to following situation:
> > > 
> > > I reload dmfe.ko (and networkmanager is disabled)
> > > I don't ifup the device, thus pretty much no hardware initialization
> > > takes place (but this appears not to matter anyway)
> > > 
> > > I then suspend the system, and WOL doesn't work (I have patched the
> > > driver to enable WOL automaticly)
> > > 
> > > I then, suspend again. WOL works, and continues to work as long as I
> > > don't reload the driver. If I do, same situation repeats.
> > > 
> > > Also, after a boot, WOL works, so a reload cycle triggers that issue.
> > > 
> > > And most importantly, if I don't do a
> > > 
> > > pci_set_power_state(pci_dev, pci_choose_state (pci_dev, state));
> > > 
> > > in .suspend, then WOL always works.
> > > 
> > > and I have even tried to set state manually to PCI_D3hot or PCI_D3cold, 
> > > 
> > > I also tried to use pci_save_state
> > > 
> > > 
> > > I also have 2 copies of this card, and both have this issue.
> > > I also tried 2 pci slots.
> > > 
> > > Kernel is vanilla 2.6.31-rc5
> 
> I need a dmesg output containing at least one suspend-resume cycle
> (preferably two cycles, the first one where WoL worked and another one
> where it didn't).


I am really sorry for late reply.

I attach the dmesg.


dmesg1 - after a boot, and dmfe reload
dmesg2 - after first s2ram cycle (wol didn't work)
dmesg3  - after second s2ram cycle (wol did work)
dmesg4 - after third s2ram cycle (wol did work), this is just in case.



Also I attach changes I did to the driver to make it enable wol by
default.


Best regards,
	Maxim Levitsky




[-- Attachment #2: dmesg.tar.bz2 --]
[-- Type: application/x-bzip-compressed-tar, Size: 41750 bytes --]

[-- Attachment #3: dmfe-enable-wol-by-default --]
[-- Type: text/plain, Size: 638 bytes --]

DMFE: enable WOL by default

From: Maxim Levitsky <maximlevitsky@gmail.com>


---

 drivers/net/tulip/dmfe.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index e26a412..8a54a5b 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -444,7 +444,8 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
 	db->chip_id = ent->driver_data;
 	db->ioaddr = pci_resource_start(pdev, 0);
 	db->chip_revision = pdev->revision;
-	db->wol_mode = 0;
+	db->wol_mode = WAKE_MAGIC;
+	device_set_wakeup_enable(&pdev->dev, 1);
 
 	db->pdev = pdev;
 

  reply	other threads:[~2009-08-20  9:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16  3:42 Very strange issues with ethernet wake on lan Maxim Levitsky
2009-08-17  9:16 ` Maxim Levitsky
2009-08-17 12:02   ` Rafael J. Wysocki
2009-08-17 18:30   ` Rafael J. Wysocki
2009-08-20  9:16     ` Maxim Levitsky [this message]
2009-09-29 20:28 ` Rafael J. Wysocki
2009-10-10 21:37   ` Maxim Levitsky
2009-10-10 21:45     ` Rafael J. Wysocki

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=1250759815.6326.5.camel@localhost.localdomain \
    --to=maximlevitsky@gmail.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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).