From nobody Tue Sep 24 10:16:36 2024 X-Original-To: dev-commits-src-main@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 4XCbPJ6CWbz5Xbqy; Tue, 24 Sep 2024 10:16:36 +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 4XCbPJ5b6Tz4yFZ; Tue, 24 Sep 2024 10:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727172996; 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=2JU7Q6a56uYUZ8EXZRfEFMGoYwVKFUVi/uSJEmfbBM4=; b=Ifqqu6IsbvRSZFrNJC35Xb7yIgxdtI5Pt92A5k9Ty4G/PXjC/vBk2zPyjRVUrRQAMwHh2j gdn6QChB1LdUlR/R2t4up6OdTTMr9EXP7l6jrFslC2nZTQps0FAxi4YunSA04iPEbZBb9R ZI+PyWP0npFvybwMN7bY9xLqmWDl0bIeZj7TeOZauorad8L5vDk0OBYt95hNEulN+ucq57 gdESIq0TZTGjUOVPD0NTziKICBz4trt5nrBy2EP3PAxURXpiGX+LjKUvXTY5tRbzFrBVe/ I3y52fYw/JeFaOIzsANCXKlCgcYmUwOPUsG5vA7AKnUg26FWrJytW1GoFrJ2UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727172996; a=rsa-sha256; cv=none; b=N9rvigq0bdlgUJzHzZ3nTtOr4F0ApMaNhSCCr1xEBCxRaYWZZ4STG1i7A/O7L7bipHWeEi Vce4VEotNgkRqcRnrDBTRG4KTZ4Ea+evWk1HBugXBHKRsoQALbyD5VkZp4NFL/e9wsZiBQ A5rDxNd+GTAO1Q8pu3qr72ZmNzACyGX5zyj64ZE3LOlYGUD2u4ZY506LmLR8xa0V16KnBx z2VFTV3unuzFeilH8nTnMmcJDe7PNGF4v7e41lk5jPn0osD8RMEAL9jRvKtdLKhqMpbRmm bvEvIl7jvGptNpgaWni5eA4MePUCI8WNbvaY+o8fX8ZIgLQygz7+bZI0PWwD0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727172996; 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=2JU7Q6a56uYUZ8EXZRfEFMGoYwVKFUVi/uSJEmfbBM4=; b=BIfHu+nm8GYzPEwF1Xe5KHzuPgs+A/+ikvrlSLoMkQNhn1ixgtNMeppdQAheVqDVWRLnvt cF+ruwurzlHHFWCZb6PZEJy4w4KenCixtv3CpG7f3dyGw02HEZSybR3NFR+ncpi2PN7giJ 26cdX0qFQ95ZDC3R1hm0Ud+78XFbix2jp7p50KjjbftSz7K7fBDaRoErIiLC+GSRCVpJWL 4LzPsa25Y5f1iWedO+uMgZI6HTARkLq+d7QYZDMik1EUoSWOcJphZ8Wv/D+bsyYPFYIy+a 4WhrlI964RUMuszB060WgSI9CPi//p9OCmwYq6Oo026wSKVO43GrlgKWsKqdow== 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 4XCbPJ53n0zPyG; Tue, 24 Sep 2024 10:16:36 +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 48OAGa3s076418; Tue, 24 Sep 2024 10:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OAGa9h076415; Tue, 24 Sep 2024 10:16:36 GMT (envelope-from git) Date: Tue, 24 Sep 2024 10:16:36 GMT Message-Id: <202409241016.48OAGa9h076415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 2e78e568c268 - main - e1000: Handle igb EEE sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 2e78e568c268e4ba846ab140d9ac6b42886f8ec7 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2e78e568c268e4ba846ab140d9ac6b42886f8ec7 commit 2e78e568c268e4ba846ab140d9ac6b42886f8ec7 Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling CommitDate: 2024-09-24 10:15:58 +0000 e1000: Handle igb EEE sysctl MFC after: 1 week Sponsored by: Blue Box Systems --- 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);