From nobody Wed Aug 5 04:43:37 2026 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 4hFHqF6DMJz6mYks for ; Wed, 05 Aug 2026 04:43:37 +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 4hFHqF3k6vz3RTt for ; Wed, 05 Aug 2026 04:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785905017; 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=Y4Mcs1aQhCMm8ST7ilL4nwW6iQyDWEI66OeRxP7YDD0=; b=Du8Uqw2nFQ1qAcXRUKjLStzGWQJZHrTYz5qWYRhau0wlpnrueoorZMIQH19p/B77elNUAU VrXcdmFrPK2dVmH78rDnvy2rLGwMwXfgJs97R5uBWkDGxVY+IbUuAA9SfK7dB6KKSccERg An2jgS6pXoCh8spLs1wLhXdq/j7Mi2wCLcZN/g7LDFNCSkqUwg18v8J2gugyhPb6kfRHfz CAC5uQPtYimorh1H5M723C2QSj5q3W5Sm7yvKAcHKVwVDt9EgRJ9vwAVe81KLSuPe2XXBH jlj+v/uQUHRIJIpblyqW61IF65ihQsqqaZgy3D7Xc2pcHd1klEjR85PkRvM1OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785905017; a=rsa-sha256; cv=none; b=wW2zmsUxhVxTavHvRgzCdH3BY3wi+aigQrMxuvvJ0CWeo0jOXqO6N1VxnXUxuRtbI3eaXg 68yTBG1Vun+s5LU7SHrL0MQUMeaxZV8nMiAuwE6c7VjvJcbq30YbZ6UhkF8zCNGNzF5mpd 7TQePaMvS/nmxLvPtxLazqEQFOonHldJzIat3KatEtBZN97ye+MjnR3+WV0WRuJn2inaX+ CNGd/SZqklyYgyNLH8Iijuzxr1TBVk2j/GiNRy5fxZ9n21uSXhFbiVzhf/JfE77uxcc6MS HWZ6mc8VBR9/yabmUAoxsTFCdC0S/LFLgcGrsKsh08qEatIUOG0M6n106vEgng== 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=1785905017; 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=Y4Mcs1aQhCMm8ST7ilL4nwW6iQyDWEI66OeRxP7YDD0=; b=GdKHlUL90URNPK+fIVQpdFXu0738gsMVG+AlKDSOwW3sNHpnTP32mbtSvEeeHxzNlwbV5y hIFfWFjmtVwydNT4YpWzDd9mrm26xqPHfNAMv6+hukfLIbQZxONPvbJwBA+qzPBcMNMBgD kbNMhAUoJR6cR4y848PEAFBr1HsLHoNCpqyMSBiFgnNoY967RKOf3zsA7n9tGaiySCr4C5 vOgQDHtYhMW54F0X5iTIpBcHtBjqcl0DATG7FmczTyZ4SviBu0nD78U5WYoFGOSfFcbrcD GR6r0Cdk04DzNva6eYWIHajRLKQmQt/Rr9LkL7mZcFC5SYJ3p5iYQaQxfD6jTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hFHqF26KWz40w for ; Wed, 05 Aug 2026 04:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1943e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 05 Aug 2026 04:43:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Kevin Bowling Subject: git: abdde8b60281 - main - e1000: defer sysctl-driven reinit to the admin task 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 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/main X-Git-Reftype: branch X-Git-Commit: abdde8b602813753e423610b39be6806da5647e2 Auto-Submitted: auto-generated Date: Wed, 05 Aug 2026 04:43:37 +0000 Message-Id: <6a72bf79.1943e.7fed4429@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=abdde8b602813753e423610b39be6806da5647e2 commit abdde8b602813753e423610b39be6806da5647e2 Author: Abdelkader Boudih AuthorDate: 2026-08-05 04:34:13 +0000 Commit: Kevin Bowling CommitDate: 2026-08-05 04:40:42 +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. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D58628 --- 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 fb12345a3f43..361d44168623 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1739,8 +1739,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); } @@ -2441,8 +2439,6 @@ em_if_media_change(if_ctx_t ctx) device_printf(sc->dev, "Unsupported media type\n"); } - em_if_init(ctx); - return (0); } @@ -6406,6 +6402,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: @@ -6451,7 +6457,7 @@ igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) return (EINVAL); } /* Reinit the interface */ - em_if_init(sc->ctx); + em_sysctl_request_reinit(sc); return (error); } @@ -6477,7 +6483,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); }