Bug 184718 - bge(4): HP MicroServer N40L, Wake-on-LAN (WoL) packet doesn't wake up the computer
Summary: bge(4): HP MicroServer N40L, Wake-on-LAN (WoL) packet doesn't wake up the com...
Status: Closed DUPLICATE of bug 218579
Alias: None
Product: Base System
Classification: Unclassified
Component: amd64 (show other bugs)
Version: 9.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 10:30 UTC by Simon Magrin
Modified: 2021-09-03 00:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Magrin 2013-12-12 10:30:00 UTC
WOL is enabled in BIOS. When I boot into Debian Linux (v7 x64) on another disk, WOL works. With FreeBSD, I cannot wake the host by sending a WOL packet from all computers I've tried.

This MicroServer N40L only has the onboard Broadcom (bge) NIC installed.

I've tried enabling WOL via 'ipconfig';

# ifconfig bge0 wol wol_ucast wol_mcast

After a power cycle, the verbose from ipconfig doesn't provide any indication (WOL_MAGIC) that it's enabled or supported.

I've tried loading the NIC driver as a start up module in the loader.conf;

if_bge_load="YES"

After a power cycle, still no go. I even tried loading known working driver (From FreeNAS forum post, see link below) to correct this;

http://forums.nas4free.org/viewtopic.php?f=69&t=2974

Though 'if_bge.ko' didn't work as well.

Cheers
Comment 1 gpalmer freebsd_committer freebsd_triage 2013-12-16 21:03:00 UTC
See also kern/177184 ( http://bugs.freebsd.org/177184 )

The patch in that bug works for me on my N40L.  Note that my if_bge is
compiled in to my kernel, not loaded as a module.  Not sure if that makes
a difference.

Regards,

Gary
Comment 2 Simon Magrin 2013-12-17 10:43:51 UTC
Thanks for the reply,
how to I apply the patch? I don't know exactly how to compile this code into the kernel.
Cheers 		 	   		  =
Comment 3 Simon Magrin 2013-12-17 11:35:09 UTC
Apologies, I should clarify, I've never done this before, so I have two questions I have;

1. How do I update the existing if_bge.c file to include WOL support with the updated code in the link?

2. How to I then compile this into the kernel?

Cheers 		 	   		  =
Comment 4 gpalmer freebsd_committer freebsd_triage 2013-12-21 18:56:20 UTC
Hi,

Assuming you have the full FreeBSD source tree for the release you are running
then download the patch file and save it somewhere

Then go to /sys/dev/bge and do

patch < /path/to/saved/patch/file

Then follow the handbook instructions for building your kernel.  If you
don't have a custom kernel configuration (i.e. "uname -I" is GENERIC)
then you can do 

cd /usr/src && make buildkernel && make installkernel

then reboot at your leisure

Note the above should only be used if you have the source tree that exactly
matches your running kernel version.

Regards,

Gary
Comment 5 Simon Magrin 2013-12-22 05:03:16 UTC
Hi Gary. I'll no doubt keep that in mind. In the mean time, I thought I'd try my luck at what NAS4Free had to offer for their if_bge< driver and they've now included the WOL fix. I tested by;
1. Retrieving the driver from the NAS4Free 9.1.0.1.847 x64 ISO (Current release to date)2. On the host, renamed the existing if_bge.ko driver3. Copied across the NAS4Free build to hosts /boot/kernel4. Probably wasn't necessary, but made the driver load upon boot up, by placing the "if_bge_load="YES" at the bottom of /boot/loader.conf file5. Bounced the host. Verbose from ifconfig bge0 confirmed WOL support;

$ bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=c219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
6. Powered down the host using shutdown -p now7. And via <i>wakeonlan</i>, sent a magic packet to the NIC and the WOL woke up the host.
The NIC seems to be behaving fine ATM, though I suspect upgrading to 10.0 will be overwrite and/or whether this driver will work if it's retrofitted back... Upon inspecting the 10.0-RC1 if_bge.c file, I didn't see any WOL lines.
Thanks for all your input and help. 
Cheers
 		 	   		  =
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:11 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 7 hvjunk 2019-12-18 06:55:52 UTC
Any possibilities of this getting ever included?
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-03 00:25:19 UTC
^Triage: stable/9 is now EoL. Addressing known Wake-on-Lan issues in bge is being tracked in bug 218579

*** This bug has been marked as a duplicate of bug 218579 ***