Date: Wed, 2 Oct 2024 19:55:59 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 999b6a9818ef - stable/13 - e1000: Handle igb EEE sysctl Message-ID: <202410021955.492JtxAe061458@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=999b6a9818ef872278fa12b92bd738e3ebfbe7de commit 999b6a9818ef872278fa12b92bd738e3ebfbe7de Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2024-10-02 19:55:01 +0000 e1000: Handle igb EEE sysctl Sponsored by: Blue Box Systems (cherry picked from commit 2e78e568c268e4ba846ab140d9ac6b42886f8ec7) --- sys/dev/e1000/if_em.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 97b298d2ec6f..c328d03dca83 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1096,7 +1096,10 @@ em_if_attach_pre(if_ctx_t ctx) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - hw->dev_spec.ich8lan.eee_disable = eee_setting; + if (hw->mac.type < igb_mac_min) + hw->dev_spec.ich8lan.eee_disable = eee_setting; + else + hw->dev_spec._82575.eee_disable = eee_setting; SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); @@ -4983,11 +4986,17 @@ em_sysctl_eee(SYSCTL_HANDLER_ARGS) struct e1000_softc *sc = (struct e1000_softc *) arg1; int error, value; - value = sc->hw.dev_spec.ich8lan.eee_disable; + if (sc->hw.mac.type < igb_mac_min) + value = sc->hw.dev_spec.ich8lan.eee_disable; + else + value = sc->hw.dev_spec._82575.eee_disable; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); - sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + if (sc->hw.mac.type < igb_mac_min) + sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + else + sc->hw.dev_spec._82575.eee_disable = (value != 0); em_if_init(sc->ctx); return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410021955.492JtxAe061458>