From nobody Wed Oct 2 19:55:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJlt74LNXz5Y1NZ; Wed, 02 Oct 2024 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJlt73mD1z4ZZK; Wed, 2 Oct 2024 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iFFAYWFaQcLkSAMlPbSWfu9yirTlCaku1NBhNQTh9O0=; b=rXrRSKpG4FsyHgQKhA5d/8ffzK8haOqsuJxF8Vh27QMDCoew7eiL5VfIq70l74Xc9Z52r2 UEX0zelUKWwspEx88nD6kwZBeD1iyZq2saZsKOw9Y3ka4V1ZT1Me2DwN+oCLpwNcm3K35h bq93/d88OhwsxIvT8BEqupGRFXHJGJ+JQzZT4hKRgT2aTop7sjeT2yXw10b0qQQahReXy+ /INMiSqUKY3FBAzjcu4rMKQ4IeAB1shOahdG4Nhdch8fqfzjNqzYaB5yKGP3aqbe/2DEsV qTBUSuLTucmYlg7kOdKNmxJj2aTlypDuQG2hyLheBScyFfgBVuJ9gOXAsdZasg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iFFAYWFaQcLkSAMlPbSWfu9yirTlCaku1NBhNQTh9O0=; b=DFAxpc4x98MvAjy7EDdW5LLY5+sJ/JdSHFTQ5kjKFE6+rhlPYpz1E7i2oFo/rD3Q8XKS5Q pgDhZcoSEbkOyQ824oCbJRCrDkDQkaGHki1OCdhGHwaxjfDhbYojV4Hnrwq3MLaiGfsdXj VJxo1R302L30G0ud68c21wdPlveS2m0cl3AMEZpDUM9WArqCzEOZuiTYY280Xfi7SvrA/n lqaRmlJ18yPwg+KsQyZTpcQ0q4dGC6N1diuX2gKynZLdZmB2rWlc1BSi6b2SD8qNzcVeRw foK4zZGru1q9xeawDvRJYcmERqwKt4pS88zV3iOUqBuZjNQBW1HYXuks60wfEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898959; a=rsa-sha256; cv=none; b=b/gQAVv29riFH4yF22KyyT/Po3XHLi6wSn9nwIAUCdcOQlTErYa+HDvCmJv5zIGP8xrALU hdtK3eXnbib3mxUCatYejOIccQAc2TEeskq1DNOYb5xJMu0sG4LBMLlJYQffBHFcn+iyUI kg8+hvakOfnYK2Ll6kqk7nnn8Yr6hvIhJ4hTw2L9k32nkPCJ6W7HW8fqMUv+370PHHn9bC /7zuvDCLuVq11ATEtPdTi6j/TPeK5+XeXy0WE1ia3yckNjZgccl2wKU/AH3OtIaFTtwKln EfB/5G5Q7z3oCEHok9dmqoTfvHq0NSTEdkEtavPLwrzPCat9rs8DGpjAHH8ywA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJlt73GfQzKTP; Wed, 2 Oct 2024 19:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 492JtxFK061461; Wed, 2 Oct 2024 19:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JtxAe061458; Wed, 2 Oct 2024 19:55:59 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:55:59 GMT Message-Id: <202410021955.492JtxAe061458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 999b6a9818ef - stable/13 - e1000: Handle igb EEE sysctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 999b6a9818ef872278fa12b92bd738e3ebfbe7de Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=999b6a9818ef872278fa12b92bd738e3ebfbe7de commit 999b6a9818ef872278fa12b92bd738e3ebfbe7de Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling 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);