From nobody Fri Oct 30 18:04:32 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 4jGTWp2grZz6xJMY for ; Fri, 30 Oct 2026 18:04:38 +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 4jGTWn74Khz4nXl for ; Fri, 30 Oct 2026 18:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793383478; 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=AScLtuld9y34GY84Eq8JR/VmPj2Bt4l1xu0Obb+WtAiv8ckkZZKyWsboOyzvrrEW1OjjDL vBPb/F4KW6jfuhQyzEgiXAa7reXG+cYuvBhoVSsvOf+eyJUykrLzozMrMW0NIYfRA10e6i 1kVfjG2siOj1ubac2CoR59ttq3Oo97cuviWrREft/dxVkt7vTPl4SA/E6kItct71/DjD0d GKdlipz4vdFVVR0xdO6SJ5hN8N3rf90eekW14w8z65lkGJVo9Ea9QAVlxgQBa3pV7Ou4gn BJeYoK0Vzd2reQ6apf/Nhkp093oJMJmsLbZA6KjO4okMjpCBY/VdKsG1x9pmwQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793383478; b=QzRWvbtTV+sZNE6VvYViMSnNb+ZTSa21EMWFg9albfKVwyQiHbOEgSWK1FnZ382br7DMsi kaucVTan2GEqsLgmjoi25QK6dy/L8ZTGJ8bWHcxPLfhk8NaBK6tzwgsNnqybCd706tCnL5 F3YUpK2Ufh70Q5Y9jMXIEsGDDeqUtW7v1yeGs9g4io9+pgvS41WHm8EKhmrMNPfYGszqIk P21db/vUeEJTI5KUn+LI932dvubhc8XsXXgElupWZAcdHAHzIONQrzr2dwbw6cX97QZLSU 574XJT04EJ9tpG5s76bTcHf+15hZW6XFbfKP8qStzDbzM3jDedHPJehDoZqmgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793383478; 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=mrJ1+2+bvhrKqBaDlkPCTyjt1qFI1zZj/Wv2BpFe4bJuVh5lnAePtd0r4r92IUnd7gEBcC q6Mmk++ECuHYrNQJze761reXYMiUsUsjTHC4pLVeyBJUP2neIEf2+xqPF5s1FRr9l+eZ++ seQQVUc2X3317SG4SHp2YG2FEIJtyPJiaPmwDW3CEd2K7DdOGf4onVipH1qP4T0EdzrjYN xC3T+OOOZx3WRVW2Z9Wu6nnvLBtfvJRSOJjJuOPTu/zoS7z3oBCcmtREW3LmpXyifvsKbR hOd/7Dhk/Cp8rfCygMp1C+g+ldwZKlWPEn80bLlpOyo6BEKExHACH1rSbJB0jw== 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 4jGTWn6kjPzfQH for ; Fri, 30 Oct 2026 18:04:37 +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-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the 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 */