diff mbox

WoL and r8169

Message ID 20090608215301.GA28044@electric-eye.fr.zoreil.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Francois Romieu June 8, 2009, 9:53 p.m. UTC
Anders Eriksson <aeriksson@fastmail.fm> :
[...]
> Any insight in the appreciated.

This one may be:

Comments

Anders Eriksson June 10, 2009, 10:29 a.m. UTC | #1
romieu@fr.zoreil.com said:
> Anders Eriksson <aeriksson@fastmail.fm> : 
> [...]
>> Any insight in the appreciated.
> This one may be:
[...]
> --  Ueimor

Yes! That diff made the trick for WoL on magic package on my 2.6.30-rc6 kernel.
Is it sent to Linus for -final?

One additional thing. The card claims to support WoL on other traffic as well:
> Supports Wake-on: pumbg

I tried to wake up the machine using regular tcp traffic, on the theory that 
it's unicast and phy activity. No luck though.

What's the trick to wake up on tcp traffic? Or did I misread the man page?

/Anders

--
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
Francois Romieu June 10, 2009, 11:01 p.m. UTC | #2
Anders Eriksson <aeriksson@fastmail.fm> :
[...]
> Yes! That diff made the trick for WoL on magic package on my 2.6.30-rc6
> kernel. Is it sent to Linus for -final?

No but it does not preclude it being properly submitted thereafter then
for -stable.

[...]
> I tried to wake up the machine using regular tcp traffic, on the theory that 
> it's unicast and phy activity. No luck though.

Did the regular tcp traffic include a so-called magic (tcp) packet ?
David Miller June 11, 2009, 9:54 a.m. UTC | #3
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 11 Jun 2009 01:01:16 +0200

> Anders Eriksson <aeriksson@fastmail.fm> :
> [...]
>> Yes! That diff made the trick for WoL on magic package on my 2.6.30-rc6
>> kernel. Is it sent to Linus for -final?
> 
> No but it does not preclude it being properly submitted thereafter then
> for -stable.

Right.  Feel free to send me a formal submission of this fix with
proper changelog and signoffs.

Thanks!
--
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
Anders Eriksson June 11, 2009, 11:14 a.m. UTC | #4
romieu@fr.zoreil.com said:
> Anders Eriksson <aeriksson@fastmail.fm> : [...]
>> Yes! That diff made the trick for WoL on magic package on my 2.6.30-rc6
>> kernel. Is it sent to Linus for -final?

> No but it does not preclude it being properly submitted thereafter then for
> -stable.

Great.

> [...]
>> I tried to wake up the machine using regular tcp traffic, on the theory that 
>> it's unicast and phy activity. No luck though.

> Did the regular tcp traffic include a so-called magic (tcp) packet ? 

Hmm,no. What is that? I'm looking at having what's best described as "wake on 
directed packet" (ref 8 here, http://en.wikipedia.org/wiki/Wake-on-LAN). 
Afaict, the box is expected to wake up on any traffic directed towards it (its 
MAC and/or IP). 

My reading of ethtool(8) says that 'u' should do the trick, and if I add 'b' I
should be able to wake on arp (as arp is eth broadcast). In my test, however, 
I've made sure to have the arp cache filled, and tcpdump confirms that an ssh 
session to a pm-suspend'd box results in a series of unicsat in-session tcp 
packets, and no arp traffic. Eventullay the arp cache times out (or is pruned 
because of the faild transmissions?) and arp requests happens, but no wakeup.


What's a magic tcp packet?

/Anders 






--
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
Francois Romieu June 12, 2009, 10:52 p.m. UTC | #5
Anders Eriksson <aeriksson@fastmail.fm> :
[...]
> What's a magic tcp packet?

As you said: a tcp packet which contains the magic sequence.
Anders Eriksson June 13, 2009, 2:19 p.m. UTC | #6
romieu@fr.zoreil.com said:
>> What's a magic tcp packet?

> As you said: a tcp packet which contains the magic sequence. 

The WoL tools I've found use UDP exclusively. What do you use to send a magic 
package using tcp?

I don't see the value of sending one with tcp, though. The tcp case _I_ am
looking for is to wake up on any tcp activity where the tcp session is used to
carry regular application data. 

-Anders


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

Patch

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8247a94..8328f4d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3817,14 +3817,6 @@  static int rtl8169_suspend(struct pci_dev *pdev, pm_message_t state)
 	netif_device_detach(dev);
 	netif_stop_queue(dev);
 
-	spin_lock_irq(&tp->lock);
-
-	rtl8169_asic_down(ioaddr);
-
-	rtl8169_rx_missed(dev, ioaddr);
-
-	spin_unlock_irq(&tp->lock);
-
 out_pci_suspend:
 	pci_save_state(pdev);
 	pci_enable_wake(pdev, pci_choose_state(pdev, state),