From nobody Wed Aug 12 20:30:20 2026 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 4hL0VW0Bwhz6nvxb for ; Wed, 12 Aug 2026 20:30:27 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hL0VV0cpRz4Dtw for ; Wed, 12 Aug 2026 20:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786566626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dddfNIJ6ss0FqRzYjFyAZ3DoiGOrkbOvXz1ztOBTZ3A=; b=VL1w4RzG+Uhjj/Pgbb9HQeqnPN02nZwsDqOLDMiqDSnECLxaP890OL4bfQUGh1uNUbTQYL V/wNJTPYTc4QghaU1Hx0Wly59SV8H7DnIvOniAf7eh3EcJj64q+kruBQW0YEAuKkUNgOEu 16zOW/uvj/TYOZAfw4TRUEBWDEm7vmp1nRD0rpp5wUtaNejj0Kv5yJj0vX9T9qAzs2y9+j EFscyduD7Necn6MY9bfsWlLGdoPS2VSJz4r5g7bJFpYahhq1hQQIR2jelWLTBu3y41ktX1 9Ut0IBorb+2PPuvFcbh7IDhnoh83Vt+TDc0LyH4aV27mJ/CkUZaJs5W4d4/M/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786566626; a=rsa-sha256; cv=none; b=hE7/dIyxwAh04iLLb6THg8GcfjeLKzIadSUwjNTMlQdgUq3geaHsPkQ39Lq/ivolD8k+R+ 799CWnTjq12nBe4tdKvTbGPeM9t2S+chfO2LJMXC1lgOyQ+9/qcSolsIEGPczeNhEokQ8S +iDpZ1JGljdAJlZdcHSBeCeXqMd8RIgIK0iwxdnuy5GiflnrooUCWizEMe/hwOPMsOBAHG 9di0eAzljIQkNwnMQC7huccn4GFHHOGhuKfsz6EX4Uwv/yMO+668nco2yrC2R/OsJlnO6k KoKsVJ93jnviSYsHJKJckhJHTx1mHM6irn8Wfn78dYquTIA6CRe1BHkFBqv5kg== 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=1786566626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dddfNIJ6ss0FqRzYjFyAZ3DoiGOrkbOvXz1ztOBTZ3A=; b=ae6euLBi827hSKzvpPYVKjvCXQ2AXnKk1w7fxYFzEu8QHxtA2yMOiJKWYLxCrJCQ0akOUv ON+Y7vDRJdIXac4V4ExpDPgHGoKJAyABJm47fqlkr/e7TyPaUwvFcM8+lVpTmdfLup0x+b DjmLEYcPPKFMlVdY6NOPoQF9ovgs1VBQg56wLwjRtzP4voPIf3iDvNbMy6xTGEonMrI/eX a752HVRySZeGYe0M42tkES7CYAnMUT7UeX9HhrcqqP9IFJOqyRLiS0uJt9w039woki2cV6 +RhZ8JOmI/55eKGQGat6q8jtp+rcyg/yAYGEEJFQNkIvJ9PzwOL++99cU1pRiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hL0VT69bmzhPG for ; Wed, 12 Aug 2026 20:30:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36caf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 12 Aug 2026 20:30:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Kevin Bowling Subject: git: cbedee9bdcda - stable/15 - e1000: defer sysctl-driven reinit to the admin task 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: cbedee9bdcda72bba3cceead8272c9b75ab90512 Auto-Submitted: auto-generated Date: Wed, 12 Aug 2026 20:30:20 +0000 Message-Id: <6a7cd7dc.36caf.15cf0184@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cbedee9bdcda72bba3cceead8272c9b75ab90512 commit cbedee9bdcda72bba3cceead8272c9b75ab90512 Author: Abdelkader Boudih AuthorDate: 2026-08-05 04:34:13 +0000 Commit: Kevin Bowling CommitDate: 2026-08-12 20:29:17 +0000 e1000: defer sysctl-driven reinit to the admin task Request the reset through iflib and let the admin task perform the stop/init under the context lock, matching what the VF and SR-IOV paths already do. The assertion is compiled out without INVARIANTS, where the same write instead resets the MAC and takes the ICH software flag while the queues stay live and an ioctl or the admin task may be running. While here also remove unnecessary em_if_init uses: iflib_if_init_locked() already runs after IFDI_RESUME and IFDI_MEDIA_CHANGE, so the trailing *_if_init() only added an unstopped IFDI_INIT that the following iflib_stop() undoes. Differential Revision: https://reviews.freebsd.org/D58628 (cherry picked from commit abdde8b602813753e423610b39be6806da5647e2) --- sys/dev/e1000/if_em.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0e850feb879d..1e027861a175 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1494,8 +1494,6 @@ em_if_resume(if_ctx_t ctx) if (sc->hw.mac.type == e1000_pch2lan) e1000_resume_workarounds_pchlan(&sc->hw); - em_if_init(ctx); - em_init_manageability(sc); return(0); } @@ -2116,8 +2114,6 @@ em_if_media_change(if_ctx_t ctx) device_printf(sc->dev, "Unsupported media type\n"); } - em_if_init(ctx); - return (0); } @@ -5709,6 +5705,16 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +static void +em_sysctl_request_reinit(struct e1000_softc *sc) +{ + if ((if_getflags(iflib_get_ifp(sc->ctx)) & IFF_UP) == 0) + return; + + iflib_request_reset(sc->ctx); + iflib_admin_intr_deferred(sc->ctx); +} + /* * Manage DMA Coalesce: * Control values: @@ -5754,7 +5760,7 @@ igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) return (EINVAL); } /* Reinit the interface */ - em_if_init(sc->ctx); + em_sysctl_request_reinit(sc); return (error); } @@ -5780,7 +5786,7 @@ em_sysctl_eee(SYSCTL_HANDLER_ARGS) sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); else sc->hw.dev_spec._82575.eee_disable = (value != 0); - em_if_init(sc->ctx); + em_sysctl_request_reinit(sc); return (0); }