From patchwork Wed Jul 22 12:58:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 30080 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4ACA1B7063 for ; Wed, 22 Jul 2009 23:00:57 +1000 (EST) Received: by ozlabs.org (Postfix) id 3D151DDD1C; Wed, 22 Jul 2009 23:00:57 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id CDE28DDD04 for ; Wed, 22 Jul 2009 23:00:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754731AbZGVM6z (ORCPT ); Wed, 22 Jul 2009 08:58:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754687AbZGVM6y (ORCPT ); Wed, 22 Jul 2009 08:58:54 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:38389 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754381AbZGVM6w (ORCPT ); Wed, 22 Jul 2009 08:58:52 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id ED9B614BE97; Wed, 22 Jul 2009 12:11:23 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16482-09; Wed, 22 Jul 2009 12:11:01 +0200 (CEST) Received: from tosh.localnet (iftwlan0.fuw.edu.pl [193.0.83.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id CC19114BF41; Wed, 22 Jul 2009 12:11:01 +0200 (CEST) From: "Rafael J. Wysocki" To: Stephen Hemminger Subject: [PATCH] NET / skge: Enable WoL by default if supported Date: Wed, 22 Jul 2009 14:58:55 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.31-rc3-rjw; KDE/4.2.4; x86_64; ; ) Cc: netdev@vger.kernel.org, pm list , LKML , Michael Guntsche MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907221458.55616.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rafael J. Wysocki 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 Tested-by: Michael Guntsche Acked-by: Stephen Hemminger --- drivers/net/skge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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 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;