Wake on LAN with FreeBSD and Broadcom Ethernet

To be fair, the Broadcom Ethernet adapter chips aren’t the best supported by FreeBSD. They’re okay, but for FreeBSD Intel rules the roost at 1-Gig and Chelsio at 10-Gig plus.

Unfortunately you may have no choice, as Broadcom chips are built in to the motherboards on some HP servers; notably the Microservers.

The Microserver Gen 7 is a great little box. I love them. I’m not so keen on the Gen 8 or Gen 10, as they’ve dropped a lot of the features that make the Gen 7 so adaptable.
So after much investigation, I decided to either forego WoL support, or bung in a cheap Realtek card simply to wake them up, but with only two PCIe slots, it was a pity to waste one on a better supported Ethernet NIC. That was a long time ago, and I’ve had one eye out for a fix for a while.

And then last year someone looked at it, and I found references to this in bug tracker. Unfortunately I don’t know who to credit with the fix, and it hasn’t made it to the kernel yet as it’s not 100%, but if you need it I’ve patched the 12.1 driver based on all the notes I could find.

There’s a question about the new driver’s correct operation on laptops. Why you’d be using WoL on a laptop eludes me; but for the Microservers it just works.

Download the patched driver ‘C’ file above (as edited by yours truly – no guarantees), and copy it to /usr/src/sys/dev/bge/if_bge.c, rebuild the kernel and away you go. As it was a bug with the state the chip was left on shutdown, you have to reboot the NEW kernel to shut down in the correct state for WoL to work. Don’t forget to enable WoL in the Microserver BIOS too.

Although this fixes the WoL issue, I know the Broadcom chips are capable of more than the driver – for example jumbo packets. If you want better network performance with a Microserver, add a dual-port Intel Ethernet card instead. Sorry, HP/Broadcom.

2 Replies to “Wake on LAN with FreeBSD and Broadcom Ethernet”

  1. I managed to get a second-hand 4-port Intel gigabit card for my Gen7 microserver allowing it to act as an extra switch. It stays on all the time so I never tried WoL.

    Have you ever used the remaining PCIx1 or the x4 that’s meant for a remote access module? I pondered getting some sort of PCIe->M.2/NVME adapter and using it for an extra storage SSD. I don’t know if that’d be too slow to be worth doing or not work under FreeBSD. But I can’t think of much else to use it for.

    A remote access card could be useful but they’re not cheap even as old/used. For remote access, I wish someone would sell a raspberry pi in PCIe card form.

    1. Sorry – missed this comment!

      I have a remote access card somewhere – came in one I bought from eBay. I’ve never found them that useful; I guess they’re for when Windoze stops working.

      I thought the slot was intended for the remote access card only; I don’t think it can be used for anything else but I never tried. The 1x slot is pretty useful – I often put USB 3 cards in them, leaving the 16x for a SAS HBA.

      Ever wished there were more than 4 slots in the drive cage? Get another G7 with a dead/useless motherboard, park it next door and run a SAS cable to it – drive cage with PSU on the cheap!

Leave a Reply

Your email address will not be published. Required fields are marked *