[Bug 282140] igc(4): Wake on LAN not working with Intel I226-V and GENERIC Kernel

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 13 Sep 2026 00:49:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282140

--- Comment #17 from commit-hook@FreeBSD.org ---
A commit in branch stable/14 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=443dc80b712c5eff1cadcd0fd816c3071aa8a0bf

commit 443dc80b712c5eff1cadcd0fd816c3071aa8a0bf
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-30 06:06:02 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-13 00:48:36 +0000

    igc: Correct Wake-on-LAN filter programming

    The attach path translated WUC.APME into a saved link-change filter,
    then advertised magic-packet wake.  Suspend removed unselected magic,
    unicast, and multicast bits from that saved value, commonly leaving no
    hardware wake filter at all.  The destructive masking also made later
    capability changes ineffective.

    Advertise the I225/I226 wake filters whenever PCI power management is
    available and enable magic-packet wake by default.  Build a fresh WUFC
    mask for every suspend, and explicitly clear WUC, WUFC, and PCI PME when
    wake is disabled.

    Require the PCI power-management capability to report D3hot PME support
    before advertising or arming wake.  A PM capability alone does not mean
    the function can signal PME from the state used during system sleep.

    Reconstruct RAR0, the multicast table, and the receive filter after the
    stop-time reset so unicast and multicast wake use the current interface
    state.  Keep the PHY powered while wake is armed, drain pending PCIe
    transactions, and disable bus mastering before D3.

    Clear the sticky base and extended wake status before arming filters.
    On resume, report the saved hardware wake cause, clear the device wake
    source, and then clear PCI PME.  Run the DMA-fencing sequence even when
    wake programming fails, while allowing shutdown to continue after
    logging the failure.  Explicitly restore PCI bus mastering during
    initialization so an iflib-local resume after another child rejects
    suspend can restart the device.

    Restore the Intel shared code PHY power down test from DPDK.  The
    FreeBSD split inverted the reset-block condition, so its dormant hook
    would power down only when firmware explicitly vetoed the operation.

    Do not copy the generic legacy management test verbatim.  The I225 and
    I226 define MANC bits 0 and 1 as flow-control and NC-SI discard
    controls, not SMBus and ASF enable bits.  Preserve the link when the
    documented TCO receive path is enabled; the shared reset-block test
    separately honors the firmware keep-link-up veto.  This follows section
    8.21.1 of the Foxville Software User Manual.

    Evaluate management pass-through at each suspend.  When neither a host
    wake filter nor management requires the link, invoke the shared-code
    power-down hook before D3.  Leave a management-owned link untouched and
    restore a link previously powered down by the driver without another
    PHY reset.  This follows DPDK's stop/start pairing without changing
    ordinary ifconfig down behavior.

    The implementation was checked against the Intel I225/I226 programming
    model, the Intel Linux igc lifecycle, and DPDK.

    On an I225-LM, a device-only D3 test observed PME for a valid magic
    packet and no PME with every host wake filter disabled.  Both cases
    resumed to D0 with the link and configured addresses operational.

    The I225 system also completed a full ACPI S3 cycle and resumed with
    link, configured addresses, and traffic operational.

    On an I226-V, a device-only D3 test changed PMCSR accordingly after a
    magic packet.  With dev.igc.0.wake enabled, a full ACPI S3 cycle
    remained asleep until a delayed magic packet and resumed with link,
    addresses, and traffic operational.

    PR:             282140
    Obtained from:  DPDK (shared-code power-down structure)

    (cherry picked from commit 90bee82638c3f277f729aa5321aacd5d7333d512)

 share/man/man4/igc.4      |  24 +++++-
 sys/dev/igc/if_igc.c      | 209 ++++++++++++++++++++++++++++++++++------------
 sys/dev/igc/if_igc.h      |   4 +-
 sys/dev/igc/igc_base.c    |   7 +-
 sys/dev/igc/igc_defines.h |   7 +-
 sys/dev/igc/igc_mac.c     |  20 +++++
 sys/dev/igc/igc_mac.h     |   1 +
 sys/dev/igc/igc_regs.h    |   2 +-
 8 files changed, 204 insertions(+), 70 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.