From nobody Fri Oct 30 18:04:32 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 4jGTWh66WDz6xHxB for ; Fri, 30 Oct 2026 18:04:32 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jGTWh5bsZz4nXW for ; Fri, 30 Oct 2026 18:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793383472; 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=iQq1PPacztGbdo9jNtRTQrV8AnzQUWCOivwQaSjxMhY=; b=iwpnYRq31WfKinxVb/Yf9CNqs8giIBhZFlH+LXMTCdh6d6MkzTmRiVds2t/NJdIL/9uxN3 HwxtjSpNjOEGFhTICVkB/+lJbBpU0wSVyIjnsYbq7nc7+bKu0kF+hPTliNKqZ6rLKYRmuq N9wOyE59haBG30Go7+MvzynYC9zx66UJpLrnzu4zJrVpz1FnRim4yUSUTx7kScHmdAy4Me bOArL+1rQYNHFz5PbgihNQVTsUw85NSByyOvwHgsxhE/xasLWcD6n6dANlMbExebMKsleK O8N9c1/y2QHtPIEtzyFv+PELyxbyV/lnbBb6Q8Yqn9THlFVKAZ6mETTO/fujnA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793383472; b=rttlIMo7Tj/kTnJRtLIZrTZ/d5S0JuUFTSFAkK8JruJ/TDJnE1L3GqWHrxWIZ2cP/Eysn6 P2hpYnZUHfR8yJbrhRubwb47/oVIFtDJWHNQl6A6yTgZRHFZnd9iVwH1AaNYrhcYLgUlpA RLVx4njK6wr2DGix4Uca/C4Lg49GPaqpzSBDr7EbGBB/Ofowdsf6WP+qkJC8A/EUYHegLQ Gde+nk6BkNNg2/bE4hNTriXDaKBCSn/qdSRiPeUUjaxq4pQVM/o17+qGzB/NYqwFSvc7nA s8tFKW+sf03YDwtZ8WKo4nT/pXX2y4HQnzhARh2omq33HuVlcGrYq4YIM20kRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793383472; 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=iQq1PPacztGbdo9jNtRTQrV8AnzQUWCOivwQaSjxMhY=; b=ACkRmP+w68+ecEEIRCOYo6OqZbZcIdLQtmzBnj7UP/uX0wKkps8jx33Fv3xAp5e47UVFzw l/fivr23pXTWTjGNVoDD/bQwdkKKdoS4/nmMs8l8xGvlaEC8qj8nPcj9E458Pl7PU0ta3s wtKhlNIwBKNg3Wx7H8r4195wvyJmdk4n7A2LUDpn2/jQ9N0j9f78h3+jf5JgMrtmKFp1gJ rsbP5KDq5CIGMX37u+5+a6NydDdHW33u2twm8XXFnhaV7MNgZSumIqxZWAHFjGoIfy+j5U G4+NsU72bG8a7xpCGEmmIUL8zOFHYC+SISixvh4vU0sWbO8CBASbDhzdqui6XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jGTWh5G6DzfGp for ; Fri, 30 Oct 2026 18:04:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43806 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 30 Oct 2026 18:04:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d2cb52033b67 - stable/15 - e1000: clear VFTA when last VLAN is removed List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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: d2cb52033b6701fbe1631b3e294109bcd8102c15 Auto-Submitted: auto-generated Date: Fri, 30 Oct 2026 18:04:32 +0000 Message-Id: <6ae4dc30.43806.347c94d8@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d2cb52033b6701fbe1631b3e294109bcd8102c15 commit d2cb52033b6701fbe1631b3e294109bcd8102c15 Author: Kevin Bowling AuthorDate: 2026-08-03 05:36:04 +0000 Commit: Kevin Bowling CommitDate: 2026-10-30 18:03:43 +0000 e1000: clear VFTA when last VLAN is removed The conventional VLAN filter update skipped zero shadow words. Removing the final VLAN represented by a VFTA word therefore left the hardware bit programmed even though the software shadow was clear. Pass the changed word to em_if_vlan_filter_write() and write it even when its new value is zero. Retained nonzero words continue to be replayed as before. (cherry picked from commit a9305a6f50be89f22c7a469aeee4c3bea2086ace) --- sys/dev/e1000/if_em.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 7829bd7a2f64..696fed6e8e25 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -467,7 +467,7 @@ static bool em_if_vlan_filter_capable(if_ctx_t); static bool em_if_vlan_filter_used(if_ctx_t); static void em_if_vlan_filter_enable(struct e1000_softc *); static void em_if_vlan_filter_disable(struct e1000_softc *); -static void em_if_vlan_filter_write(struct e1000_softc *); +static void em_if_vlan_filter_write(struct e1000_softc *, int); static void em_setup_vlan_hw_support(if_ctx_t ctx); static int em_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); static void em_print_nvm_info(struct e1000_softc *); @@ -5596,7 +5596,7 @@ em_if_vlan_register(if_ctx_t ctx, u16 vtag) sc->shadow_vfta[index] |= (1 << bit); ++sc->num_vlans; if (!sc->vf_ifp) - em_if_vlan_filter_write(sc); + em_if_vlan_filter_write(sc, index); else /* * Physical funtion may reject registering VLAN @@ -5617,7 +5617,7 @@ em_if_vlan_unregister(if_ctx_t ctx, u16 vtag) sc->shadow_vfta[index] &= ~(1 << bit); --sc->num_vlans; if (!sc->vf_ifp) - em_if_vlan_filter_write(sc); + em_if_vlan_filter_write(sc, index); else e1000_vfta_set_vf(&sc->hw, vtag, false); } @@ -5673,7 +5673,7 @@ em_if_vlan_filter_disable(struct e1000_softc *sc) } static void -em_if_vlan_filter_write(struct e1000_softc *sc) +em_if_vlan_filter_write(struct e1000_softc *sc, int changed_index) { struct e1000_hw *hw = &sc->hw; @@ -5683,8 +5683,13 @@ em_if_vlan_filter_write(struct e1000_softc *sc) if (hw->mac.type < em_mac_min) em_if_intr_disable(sc->ctx); + /* + * Restore every retained VLAN after reset. Also write the changed + * word when its final VLAN was removed so stale hardware membership + * does not survive a zero shadow value. + */ for (int i = 0; i < EM_VFTA_SIZE; i++) - if (sc->shadow_vfta[i] != 0) + if (sc->shadow_vfta[i] != 0 || i == changed_index) e1000_write_vfta(hw, i, sc->shadow_vfta[i]); /* Re-enable interrupts for lem-class devices */