lkml.org 
[lkml]   [2008]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] Adapt the sky2 driver to the reworked PCI PM
On Thu, 14 Aug 2008 23:38:17 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> Adapt the sky2 driver to the reworked PCI PM
>
> * Use device_set_wakeup_enable() and friends as needed
> * Remove an open-coded reference to the standard PCI PM registers
> * Use pci_prepare_to_sleep() and pci_back_from_sleep() in the
> ->suspend() and ->resume() callbacks
> * Use the observation that it is sufficient to call pci_enable_wake()
> once, unless it fails
>
> Tested on Asus M3A32-MVP (Yukon-2 EC Ultra rev 3).
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/net/sky2.c | 34 ++++++++++------------------------
> 1 file changed, 10 insertions(+), 24 deletions(-)
>
> Index: linux-2.6/drivers/net/sky2.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/sky2.c
> +++ linux-2.6/drivers/net/sky2.c
> @@ -3035,7 +3035,8 @@ static int sky2_set_wol(struct net_devic
> struct sky2_port *sky2 = netdev_priv(dev);
> struct sky2_hw *hw = sky2->hw;
>
> - if (wol->wolopts & ~sky2_wol_supported(sky2->hw))
> + if ((wol->wolopts & ~sky2_wol_supported(sky2->hw))
> + || !device_can_wakeup(&hw->pdev->dev))
> return -EOPNOTSUPP;
>

There was a regression in earlier releases caused because some BIOS's
are wrong, and device can wakeup.


\
 
 \ /
  Last update: 2008-08-15 00:25    [W:0.040 / U:2.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site