From nobody Wed Oct 02 19:53:18 2024 X-Original-To: dev-commits-src-all@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 4XJlq25P5mz5Y1dN; Wed, 02 Oct 2024 19:53:18 +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 4XJlq24nhsz4Xm9; Wed, 2 Oct 2024 19:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898798; 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=+DMTW5+gN21DrlXyYSWvERaTtZjiwQBVOJ8mB1ZuQGk=; b=lb3zSBHmYyj8ueL7CBMyZtLvcIKqeEzHR43I1qn97eUDgDxpMlyqsMyEYHNt/vgNcCWQoE klUFNXgFPdltI6iuzKr+uOc45woza617h7k+ncGHpJzthjoNvVb7Wr2Jx45uxaBIB3x3Ar PfYK3OSd1zeYMKLWNjuPmV9pf2hkpghhk+C+8NN56bucyT7v2fjRAxdBVRH2g/X3OrNXo6 Ln2AQp29ywx3wpQ93ADEBsu8GURgCuINAAdYljtwlay+sPuM3SUQa44vxWcX2/2WhiSMs1 nI/uSLzANhXHv3BxO+WyZkepPTJ5qVu5x1Zuhy475rAtCnSHa1YNGAFt8/iw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898798; 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=+DMTW5+gN21DrlXyYSWvERaTtZjiwQBVOJ8mB1ZuQGk=; b=tTGDshprlesZemKq98QT6qD1swEAnchHFSxqRJWYT16RqDLchv8bsJiy5UUN5UQ62vHzYQ Ot9i5twPUI31Ax2wt+nq5vdtb3UzIxH0iCaLzPjRsWkLHv+ADTp6YcCiPciZOdb0fdv4lP IwRJV0QIWh9zg1gZePeysE248GSWR/P/pNKHlp657eXWLUhJrnatjA/YuJLiBI1SO+SS6t LIRUB9/kRYCdrngf+bc/1CQcInHNqRuMwc82OiMFBjzMEFdbpCnxLR8snFbBfbscDy33yT +k2VsItq+N/UwMk+/5EkBRH/EYccfhaH4T65QZfllztIgkr8VPXVwnE4MSAY8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898798; a=rsa-sha256; cv=none; b=GRuQJMY1UlvZHF3Hof0+IaclxP/OPLFTHACWKvzFZhXPhnj0rOeruJUQSSyKCM354IqFnI A53GXlRZIkA69gtD1LpiopzgVxloRdBkgk8HvnLoGjwWBTQ+hT/d72ACBDUk+is5+SACDG elRHtRzD44jhKq18V6QK+4NlKMmuP3+Xy9lQJ5TCXz0m+EJ+J6TPii9ybLuBsE1YDlLN1x 5eM4y6qrYmliJhFyb2qlpwec2e33IEV4AXW6X+ygsQFC/33cs2wkuX6Ot7hc81TQnvNQLR OlxaTUXr44AKWKnSz5ypolfkQ5FQjbqjbK8smEzgZaFCvxw38rgIpkH4HogX8g== 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 4XJlq24PQZzJng; Wed, 2 Oct 2024 19:53:18 +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 492JrIu9060528; Wed, 2 Oct 2024 19:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrI5f060525; Wed, 2 Oct 2024 19:53:18 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:18 GMT Message-Id: <202410021953.492JrI5f060525@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: 4ce45606add9 - stable/14 - e1000: Handle igb EEE sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 4ce45606add99d568d5b7ae6354c18a378e29482 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=4ce45606add99d568d5b7ae6354c18a378e29482 commit 4ce45606add99d568d5b7ae6354c18a378e29482 Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:02 +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 5fb46c9f6dce..d06627bcfda1 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1094,7 +1094,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"); @@ -4981,11 +4984,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);