* [PATCH] NET / skge: Enable WoL by default if supported
@ 2009-07-22 12:58 Rafael J. Wysocki
2009-07-22 16:59 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2009-07-22 12:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, pm list, Michael Guntsche, LKML
From: Rafael J. Wysocki <rjw@sisk.pl>
If skge hardware is capable of waking up the system from sleep,
enable magic packet WoL during driver initialisation.
This makes WoL work without calling 'ethtool -s ethX wol g'
for each adapter.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Michael Guntsche <mike@it-loops.com>
---
drivers/net/skge.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/net/skge.c
===================================================================
--- linux-2.6.orig/drivers/net/skge.c
+++ linux-2.6/drivers/net/skge.c
@@ -3856,8 +3856,10 @@ static struct net_device *skge_devinit(s
skge->speed = -1;
skge->advertising = skge_supported_modes(hw);
- if (device_may_wakeup(&hw->pdev->dev))
+ if (device_can_wakeup(&hw->pdev->dev)) {
skge->wol = wol_supported(hw) & WAKE_MAGIC;
+ device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
+ }
hw->dev[port] = dev;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NET / skge: Enable WoL by default if supported
2009-07-22 12:58 [PATCH] NET / skge: Enable WoL by default if supported Rafael J. Wysocki
@ 2009-07-22 16:59 ` Stephen Hemminger
2009-07-22 18:25 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2009-07-22 16:59 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: netdev, pm list, LKML, Michael Guntsche
On Wed, 22 Jul 2009 14:58:55 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> If skge hardware is capable of waking up the system from sleep,
> enable magic packet WoL during driver initialisation.
>
> This makes WoL work without calling 'ethtool -s ethX wol g'
> for each adapter.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> Tested-by: Michael Guntsche <mike@it-loops.com>
> ---
> drivers/net/skge.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/net/skge.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/skge.c
> +++ linux-2.6/drivers/net/skge.c
> @@ -3856,8 +3856,10 @@ static struct net_device *skge_devinit(s
> skge->speed = -1;
> skge->advertising = skge_supported_modes(hw);
>
> - if (device_may_wakeup(&hw->pdev->dev))
> + if (device_can_wakeup(&hw->pdev->dev)) {
> skge->wol = wol_supported(hw) & WAKE_MAGIC;
> + device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
> + }
>
> hw->dev[port] = dev;
>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NET / skge: Enable WoL by default if supported
2009-07-22 16:59 ` Stephen Hemminger
@ 2009-07-22 18:25 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-07-22 18:25 UTC (permalink / raw)
To: shemminger; +Cc: rjw, netdev, linux-pm, linux-kernel, mike
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 22 Jul 2009 09:59:53 -0700
> On Wed, 22 Jul 2009 14:58:55 +0200
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
>> From: Rafael J. Wysocki <rjw@sisk.pl>
>>
>> If skge hardware is capable of waking up the system from sleep,
>> enable magic packet WoL during driver initialisation.
>>
>> This makes WoL work without calling 'ethtool -s ethX wol g'
>> for each adapter.
>>
>> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
>> Tested-by: Michael Guntsche <mike@it-loops.com>
>> ---
>> drivers/net/skge.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> Index: linux-2.6/drivers/net/skge.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/net/skge.c
>> +++ linux-2.6/drivers/net/skge.c
>> @@ -3856,8 +3856,10 @@ static struct net_device *skge_devinit(s
>> skge->speed = -1;
>> skge->advertising = skge_supported_modes(hw);
>>
>> - if (device_may_wakeup(&hw->pdev->dev))
>> + if (device_can_wakeup(&hw->pdev->dev)) {
>> skge->wol = wol_supported(hw) & WAKE_MAGIC;
>> + device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
>> + }
>>
>> hw->dev[port] = dev;
>>
>
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-22 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22 12:58 [PATCH] NET / skge: Enable WoL by default if supported Rafael J. Wysocki
2009-07-22 16:59 ` Stephen Hemminger
2009-07-22 18:25 ` David Miller
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).