All of lore.kernel.org
 help / color / mirror / Atom feed
* Very strange issues with ethernet wake on lan
@ 2009-08-16  3:42 Maxim Levitsky
  0 siblings, 0 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-16  3:42 UTC (permalink / raw)
  To: netdev; +Cc: linux-pm

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


Any ideas?

Best regards,
	Maxim Levitsky

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

* Re: Very strange issues with ethernet wake on lan
  2009-10-10 21:37   ` Maxim Levitsky
@ 2009-10-10 21:45     ` Rafael J. Wysocki
  0 siblings, 0 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-10-10 21:45 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

On Saturday 10 October 2009, Maxim Levitsky wrote:
> On Tue, 2009-09-29 at 22:28 +0200, Rafael J. Wysocki wrote: 
> > On Sunday 16 August 2009, 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
> > 
> > Please check if this still happens with 2.6.32-rc1.
> 
> It doesn't! (-git as of today tested)

Great, thanks for verifying.

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-09-29 20:28 ` Rafael J. Wysocki
@ 2009-10-10 21:37   ` Maxim Levitsky
  2009-10-10 21:45     ` Rafael J. Wysocki
  0 siblings, 1 reply; 15+ messages in thread
From: Maxim Levitsky @ 2009-10-10 21:37 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: netdev, linux-pm

On Tue, 2009-09-29 at 22:28 +0200, Rafael J. Wysocki wrote: 
> On Sunday 16 August 2009, 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
> 
> Please check if this still happens with 2.6.32-rc1.

It doesn't! (-git as of today tested)

Thanks,
Best regards,
Maxim Levitsky

> 
> Best,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-16  3:42 Maxim Levitsky
  2009-08-17  9:16 ` Maxim Levitsky
  2009-08-17  9:16 ` Maxim Levitsky
@ 2009-09-29 20:28 ` Rafael J. Wysocki
  2009-10-10 21:37   ` Maxim Levitsky
  2009-09-29 20:28 ` Rafael J. Wysocki
  3 siblings, 1 reply; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-09-29 20:28 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

On Sunday 16 August 2009, 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

Please check if this still happens with 2.6.32-rc1.

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-16  3:42 Maxim Levitsky
                   ` (2 preceding siblings ...)
  2009-09-29 20:28 ` Rafael J. Wysocki
@ 2009-09-29 20:28 ` Rafael J. Wysocki
  3 siblings, 0 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-09-29 20:28 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

On Sunday 16 August 2009, 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

Please check if this still happens with 2.6.32-rc1.

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17 18:30   ` Rafael J. Wysocki
@ 2009-08-20  9:16     ` Maxim Levitsky
  2009-08-20  9:16     ` Maxim Levitsky
  2009-08-20  9:16     ` Maxim Levitsky
  2 siblings, 0 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-20  9:16 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: netdev, linux-pm

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

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17 18:30   ` Rafael J. Wysocki
  2009-08-20  9:16     ` Maxim Levitsky
  2009-08-20  9:16     ` Maxim Levitsky
@ 2009-08-20  9:16     ` Maxim Levitsky
  2 siblings, 0 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-20  9:16 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: netdev, linux-pm

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

[-- Attachment #4: Type: text/plain, Size: 0 bytes --]



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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17 18:30   ` Rafael J. Wysocki
  2009-08-20  9:16     ` Maxim Levitsky
@ 2009-08-20  9:16     ` Maxim Levitsky
  2009-08-20  9:16     ` Maxim Levitsky
  2 siblings, 0 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-20  9:16 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: netdev, linux-pm

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

[-- Attachment #4: Type: text/plain, Size: 0 bytes --]



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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17  9:16 ` Maxim Levitsky
  2009-08-17 12:02   ` Rafael J. Wysocki
  2009-08-17 12:02   ` Rafael J. Wysocki
@ 2009-08-17 18:30   ` Rafael J. Wysocki
  2009-08-20  9:16     ` Maxim Levitsky
                       ` (2 more replies)
  2009-08-17 18:30   ` Rafael J. Wysocki
  3 siblings, 3 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 18:30 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

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

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17  9:16 ` Maxim Levitsky
                     ` (2 preceding siblings ...)
  2009-08-17 18:30   ` Rafael J. Wysocki
@ 2009-08-17 18:30   ` Rafael J. Wysocki
  3 siblings, 0 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 18:30 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

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

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17  9:16 ` Maxim Levitsky
@ 2009-08-17 12:02   ` Rafael J. Wysocki
  2009-08-17 12:02   ` Rafael J. Wysocki
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 12:02 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

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
> 
> 
> Bisect reveals:
> 
> 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8 is first bad commit
> commit 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8
> Author: Rafael J. Wysocki <rjw@sisk.pl>
> Date:   Mon Jul 7 03:32:52 2008 +0200
> 
>     PCI: rework pci_set_power_state function to call platform first
>     
>     Rework pci_set_power_state() so that the platform callback is
>     invoked before the native mechanism, if necessary.  Also, make
>     the function check if the device is power manageable by the
>     platform before invoking the platform callback.
>     
>     This may matter if the device dependent on additional power
>     resources controlled by the platform is being put into D0, in which
>     case those power resources must be turned on before we attempt to
>     handle the device itself.
>     
>     Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
>     Acked-by: Pavel Machek <pavel@suse.cz>
>     Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> 
> 
> Note that probably this device has no acpi entries, because it is an
> addon card, bios knows nothing about it

Well, thanks, but I was going to have a look at this issue anyway. :-)

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-17  9:16 ` Maxim Levitsky
  2009-08-17 12:02   ` Rafael J. Wysocki
@ 2009-08-17 12:02   ` Rafael J. Wysocki
  2009-08-17 18:30   ` Rafael J. Wysocki
  2009-08-17 18:30   ` Rafael J. Wysocki
  3 siblings, 0 replies; 15+ messages in thread
From: Rafael J. Wysocki @ 2009-08-17 12:02 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: netdev, linux-pm

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
> 
> 
> Bisect reveals:
> 
> 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8 is first bad commit
> commit 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8
> Author: Rafael J. Wysocki <rjw@sisk.pl>
> Date:   Mon Jul 7 03:32:52 2008 +0200
> 
>     PCI: rework pci_set_power_state function to call platform first
>     
>     Rework pci_set_power_state() so that the platform callback is
>     invoked before the native mechanism, if necessary.  Also, make
>     the function check if the device is power manageable by the
>     platform before invoking the platform callback.
>     
>     This may matter if the device dependent on additional power
>     resources controlled by the platform is being put into D0, in which
>     case those power resources must be turned on before we attempt to
>     handle the device itself.
>     
>     Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
>     Acked-by: Pavel Machek <pavel@suse.cz>
>     Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> 
> 
> Note that probably this device has no acpi entries, because it is an
> addon card, bios knows nothing about it

Well, thanks, but I was going to have a look at this issue anyway. :-)

Best,
Rafael

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

* Re: Very strange issues with ethernet wake on lan
  2009-08-16  3:42 Maxim Levitsky
@ 2009-08-17  9:16 ` Maxim Levitsky
  2009-08-17 12:02   ` Rafael J. Wysocki
                     ` (3 more replies)
  2009-08-17  9:16 ` Maxim Levitsky
                   ` (2 subsequent siblings)
  3 siblings, 4 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-17  9:16 UTC (permalink / raw)
  To: netdev; +Cc: linux-pm, Rafael J. Wysocki

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


Bisect reveals:

44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8 is first bad commit
commit 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Mon Jul 7 03:32:52 2008 +0200

    PCI: rework pci_set_power_state function to call platform first
    
    Rework pci_set_power_state() so that the platform callback is
    invoked before the native mechanism, if necessary.  Also, make
    the function check if the device is power manageable by the
    platform before invoking the platform callback.
    
    This may matter if the device dependent on additional power
    resources controlled by the platform is being put into D0, in which
    case those power resources must be turned on before we attempt to
    handle the device itself.
    
    Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
    Acked-by: Pavel Machek <pavel@suse.cz>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


Note that probably this device has no acpi entries, because it is an
addon card, bios knows nothing about it


Best regards,
	Maxim Levitsky



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

* Re: Very strange issues with ethernet wake on lan
  2009-08-16  3:42 Maxim Levitsky
  2009-08-17  9:16 ` Maxim Levitsky
@ 2009-08-17  9:16 ` Maxim Levitsky
  2009-09-29 20:28 ` Rafael J. Wysocki
  2009-09-29 20:28 ` Rafael J. Wysocki
  3 siblings, 0 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-17  9:16 UTC (permalink / raw)
  To: netdev; +Cc: linux-pm

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


Bisect reveals:

44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8 is first bad commit
commit 44e4e66eeae5338b3ca0b28f8352e60bf18d5ba8
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Mon Jul 7 03:32:52 2008 +0200

    PCI: rework pci_set_power_state function to call platform first
    
    Rework pci_set_power_state() so that the platform callback is
    invoked before the native mechanism, if necessary.  Also, make
    the function check if the device is power manageable by the
    platform before invoking the platform callback.
    
    This may matter if the device dependent on additional power
    resources controlled by the platform is being put into D0, in which
    case those power resources must be turned on before we attempt to
    handle the device itself.
    
    Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
    Acked-by: Pavel Machek <pavel@suse.cz>
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


Note that probably this device has no acpi entries, because it is an
addon card, bios knows nothing about it


Best regards,
	Maxim Levitsky

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

* Very strange issues with ethernet wake on lan
@ 2009-08-16  3:42 Maxim Levitsky
  2009-08-17  9:16 ` Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Maxim Levitsky @ 2009-08-16  3:42 UTC (permalink / raw)
  To: netdev; +Cc: linux-pm, Rafael J. Wysocki

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


Any ideas?

Best regards,
	Maxim Levitsky


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

end of thread, other threads:[~2009-10-10 21:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-16  3:42 Very strange issues with ethernet wake on lan Maxim Levitsky
2009-08-16  3:42 Maxim Levitsky
2009-08-17  9:16 ` Maxim Levitsky
2009-08-17 12:02   ` Rafael J. Wysocki
2009-08-17 12:02   ` Rafael J. Wysocki
2009-08-17 18:30   ` Rafael J. Wysocki
2009-08-20  9:16     ` Maxim Levitsky
2009-08-20  9:16     ` Maxim Levitsky
2009-08-20  9:16     ` Maxim Levitsky
2009-08-17 18:30   ` Rafael J. Wysocki
2009-08-17  9:16 ` Maxim Levitsky
2009-09-29 20:28 ` Rafael J. Wysocki
2009-10-10 21:37   ` Maxim Levitsky
2009-10-10 21:45     ` Rafael J. Wysocki
2009-09-29 20:28 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.