[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081004180834.71c1bdf2@neptune.home>
Date: Sat, 4 Oct 2008 18:08:34 +0200
From: Bruno Prémont <bonbons@...ux-vserver.org>
To: Francois Romieu <romieu@...zoreil.com>
Cc: netdev@...r.kernel.org, "Rafael J. Wysocki" <rjw@...k.pl>,
Andrew Morton <akpm@...ux-foundation.org>,
Len Brown <lenb@...nel.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org
Subject: [PATCH 2/2] r8169: WoL fixes
Since recent kernel (2.6.26 or 2.6.27) the PCI wakeup functions are
influenced by generic device ability and configuration when enabling
PCI-device triggered wake-up.
This patch causes WoL setting to enable/disable device's wish to
be permitted to wake-up the host when changing WoL options and
also during device probing.
Without this patch one has write 'enabled' to
/sys/bus/pci/devices/0000:02:08.0/power/wakeup
Signed-off-by: Bruno Prémont <bonbons@...ux-vserver.org>
---
--- linux-2.6.27-rc8-git6.orig/drivers/net/r8169.c 2008-10-04 12:31:48.000000000 +0200
+++ linux-2.6.27-rc8-git6/drivers/net/r8169.c 2008-10-04 16:51:48.000000000 +0200
@@ -619,6 +619,7 @@ static int rtl8169_set_wol(struct net_de
tp->features |= RTL_FEATURE_WOL;
else
tp->features &= ~RTL_FEATURE_WOL;
+ device_set_wakeup_enable(&tp->pci_dev->dev, wol->wolopts);
spin_unlock_irq(&tp->lock);
@@ -1796,6 +1797,7 @@ rtl8169_init_one(struct pci_dev *pdev, c
}
rtl8169_init_phy(dev, tp);
+ device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
out:
return rc;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists