netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* small forcedeth WoL fix
@ 2007-06-02  0:22 Tim Mann
  2007-06-13 20:38 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Mann @ 2007-06-02  0:22 UTC (permalink / raw)
  To: netdev; +Cc: mann

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

I happened to notice that a system with an NVidia NIC using the
forcedeth driver won't wake-on-LAN if the interface was in promiscuous
mode when you power off.  By experiment, it looks like
the hardware needs to have NvRegPacketFilterFlags set to
NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR (i.e., receive unicast packets to my
address) in order for WoL to work.  At any rate, the attached patch
fixes the problem for me.

-- 
Tim Mann  work: mann@vmware.com  home: tim@tim-mann.org
          http://www.vmware.com  http://tim-mann.org

[-- Attachment #2: wol-fix.patch --]
[-- Type: text/x-patch, Size: 360 bytes --]

--- forcedeth-git-netdev.c	2007-06-01 16:43:19.971507000 -0700
+++ forcedeth-git-netdev-fixed.c	2007-06-01 16:46:53.389713000 -0700
@@ -4830,8 +4830,10 @@
 
 	drain_ring(dev);
 
-	if (np->wolenabled)
+	if (np->wolenabled) {
+		writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags);
 		nv_start_rx(dev);
+	}
 
 	/* FIXME: power down nic */
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: small forcedeth WoL fix
  2007-06-02  0:22 small forcedeth WoL fix Tim Mann
@ 2007-06-13 20:38 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-06-13 20:38 UTC (permalink / raw)
  To: Tim Mann; +Cc: netdev, Andrew Morton

Tim Mann wrote:
> I happened to notice that a system with an NVidia NIC using the
> forcedeth driver won't wake-on-LAN if the interface was in promiscuous
> mode when you power off.  By experiment, it looks like
> the hardware needs to have NvRegPacketFilterFlags set to
> NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR (i.e., receive unicast packets to my
> address) in order for WoL to work.  At any rate, the attached patch
> fixes the problem for me.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- forcedeth-git-netdev.c	2007-06-01 16:43:19.971507000 -0700
> +++ forcedeth-git-netdev-fixed.c	2007-06-01 16:46:53.389713000 -0700
> @@ -4830,8 +4830,10 @@
>  
>  	drain_ring(dev);
>  
> -	if (np->wolenabled)
> +	if (np->wolenabled) {
> +		writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags);
>  		nv_start_rx(dev);
> +	}

Please resend as a proper Linux patch[1], apply-able using "patch -sp1", 
and including a signed-off-by line.

NVIDIA says the patch looks OK.

	Jeff


[1] Documentation/SubmittingPatches or 
http://linux.yyz.us/patch-format.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-13 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-02  0:22 small forcedeth WoL fix Tim Mann
2007-06-13 20:38 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).