lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812081250.59095.rjw@sisk.pl>
Date:	Mon, 8 Dec 2008 12:50:58 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Michael Chan <mchan@...adcom.com>
Cc:	netdev@...r.kernel.org, Jeff Garzik <jeff@...zik.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: net (tg3): Fix failure to enable WoL by default when possible

On Monday, 8 of December 2008, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@...k.pl>
> Subject: net (tg3): Fix failure to enable WoL by default when possible
> 
> tg3 is supposed to enable WoL by default on adapters which support
> that, but it fails to do so unless the adapter's
> /sys/devices/.../power/wakeup file contains 'enabled' during the
> initialization of the adapter.  Fix that by making tg3 update the
> device's 'should_wakeup' bit automatically whenever WoL should be
> enabled by default.

This version of the patch is incomplete, because there's one more place where
an analogous change has to be made.

I'll send the updated patch in a reply to this message.

Thanks,
Rafael


> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> ---
>  drivers/net/tg3.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/net/tg3.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/tg3.c
> +++ linux-2.6/drivers/net/tg3.c
> @@ -11296,9 +11296,10 @@ static void __devinit tg3_get_eeprom_hw_
>  		if (val & VCPU_CFGSHDW_ASPM_DBNC)
>  			tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
>  		if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
> -		    (val & VCPU_CFGSHDW_WOL_MAGPKT) &&
> -		    device_may_wakeup(&tp->pdev->dev))
> +		    (val & VCPU_CFGSHDW_WOL_MAGPKT)) {
>  			tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
> +			device_set_wakeup_enable(&tp->pdev->dev, true);
> +		}
>  		return;
>  	}
>  
> --
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ