Skip to contentSkip to conversation

small forcedeth WoL fix

PATCH Tim Mann 2 participants 2 messages Jun 2, 2007 – Jun 13, 2007

Subsystems (2)
lore
Share & tools
lore

Tim Mann

author
#0 lore raw

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.

Signature · 2 lines
Tim Mann  work: [email protected]  home: [email protected]
          http://www.vmware.com  http://tim-mann.org
forcedeth-git-netdev-fixed.c renamed from forcedeth-git-netdev.c +3 -1
@@ -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 */
 
#1 lore raw
Quoted 15 lines · Tim Mann

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-fixed.c line 4836

Quoted 8 lines
forcedeth-git-netdev-fixed.c renamed from forcedeth-git-netdev.c +3 -1
@@ -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