From: Brandon Philips Subject: [PATCH] atl1*: add device_set_wakeup_enable to atl1*_set_wol Date: Wed, 24 Jun 2009 17:09:14 -0700 Message-ID: <20090625000914.GL3648@jenkins.smartcity.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org To: jcliburn@gmail.com, csnook@redhat.com, jie.yang@atheros.com, rjw@sisk.pl Return-path: Received: from rv-out-0506.google.com ([209.85.198.231]:25603 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565AbZFYAKO (ORCPT ); Wed, 24 Jun 2009 20:10:14 -0400 Received: by rv-out-0506.google.com with SMTP id k40so204234rvb.5 for ; Wed, 24 Jun 2009 17:10:17 -0700 (PDT) Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: Tell PCI core that atl1* device can wakeup the system when WOL is enabled by calling device_set_wakeup_enable. Joerg noted that his atl1e device WOL fine after enabling it with ethtool and changing /sys/class/net/eth0/device/power/wakeup to enabled Tested on atl1e: https://bugzilla.novell.com/show_bug.cgi?id=493214 Tested by: Joerg Reuter Signed-off-by: Brandon Philips --- drivers/net/atl1c/atl1c_ethtool.c | 2 ++ drivers/net/atl1e/atl1e_ethtool.c | 2 ++ 2 files changed, 4 insertions(+) Index: linux-2.6/drivers/net/atl1e/atl1e_ethtool.c =================================================================== --- linux-2.6.orig/drivers/net/atl1e/atl1e_ethtool.c +++ linux-2.6/drivers/net/atl1e/atl1e_ethtool.c @@ -365,6 +365,8 @@ static int atl1e_set_wol(struct net_devi if (wol->wolopts & WAKE_PHY) adapter->wol |= AT_WUFC_LNKC; + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + return 0; } Index: linux-2.6/drivers/net/atl1c/atl1c_ethtool.c =================================================================== --- linux-2.6.orig/drivers/net/atl1c/atl1c_ethtool.c +++ linux-2.6/drivers/net/atl1c/atl1c_ethtool.c @@ -281,6 +281,8 @@ static int atl1c_set_wol(struct net_devi if (wol->wolopts & WAKE_PHY) adapter->wol |= AT_WUFC_LNKC; + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + return 0; }