ed: 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 4hDBlP14cNz46gp for ; Mon, 03 Aug 2026 09:51:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785750689; 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=//EoXyMzGFCkWLLmqqdrHAjzF6+rnSMSSviQ7AVeklM=; b=wOffobsjfxK5vl8qjUtq7/O5l7hp5LF/+Tk+UCEJlc5YND1/+bo+pUop+6YgrvphTSxoo3 6lVV+UaYBoRnAaJzwMbIxtgaaCzcPDAAOBbyr7mtnPLK2AWoRu5L2p3IvnO/QENrvtCYas S8vhPvARqjAL/zVIOhlIt9Y/shmlHgkco1WeHeSXiKEI8JxIDVqCjMraHe2poOPMJ7r2II vaOYMqJC5S0w68jw/pkN+VCWkITOWR0Ftjsis1Cpsb3qItlTDfJ4HCQ/bf7GeHRr3ojdQJ i6bZ0B37gzqidd78SYCUo9WXYqpwq9ewj+OvE9omHl0Ux6mcDexer0evqZyavA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785750689; a=rsa-sha256; cv=none; b=w1puVTL+QurOf4mDuNII89T2Lrl647yUW4LNlrKuo/64DphJrFBFtgeuypAwppGG7QLQp+ l67M9utUSJYnUw9IZZDs7X2rvwgSrYRD1pbJEs0+xIyHJYvuuMio5o/xE6Ovs2GGejD/uf 0qFkN5FKkTFIWcHHM7IA8G69qVA81EvL6wrEePRx4PX0eW9qJWVTlgPEkoxfdxKIq6vAhG f9YyIJs7Y50WFGt29388YiwzlJu2rFqcmqoi77NRrGVV8sjBlpIx4B3UPwc8XVMY9O4+gK pXoV9unWIKijLpLC4goNV2QZHQ7eHQP8s9JJt2TELTNmP1gLfXDVl0/2sr/FHg== 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=1785750689; 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=//EoXyMzGFCkWLLmqqdrHAjzF6+rnSMSSviQ7AVeklM=; b=P6KJWErSE1aI2AJXTeozruQrjmcPJXLio8Va0MKH5wjllU3yBqBcwDU6ZLAsVobsStDZwe lBpINWuxKjXYPXuN4s2A0pU2GNy2l1QBg7mAIxEWHfTx/cabjJNH/PzhXrQ7L65Hj/+BVq ohRhvzqfIDrgjQYXFKFkR3HO5DVWbREhh3WXuM2PjpBgNJiugUiK18N0xC+8MmWq8IE2Ai 5NSo0vkEPwDQfefjsfR+Ly2HW4cQ4eXJPGw+37bzlvEu3QePfnTmuRpZCjQWJ1dFxXh4mb eU83yuZI3zeyhsDXobnNFAwE3Ldhg/vvJ7hV8JVUOq0fqHbavdLnYhPknnhwaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hDBlN6TQdzw72 for ; Mon, 03 Aug 2026 09:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41020 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 03 Aug 2026 09:51:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: a9305a6f50be - main - e1000: clear VFTA when last VLAN is removed 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: a9305a6f50be89f22c7a469aeee4c3bea2086ace Auto-Submitted: auto-generated Date: Mon, 03 Aug 2026 09:51:28 +0000 Message-Id: <6a7064a0.41020.5abb66bb@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a9305a6f50be89f22c7a469aeee4c3bea2086ace commit a9305a6f50be89f22c7a469aeee4c3bea2086ace Author: Kevin Bowling AuthorDate: 2026-08-03 05:36:04 +0000 Commit: Kevin Bowling CommitDate: 2026-08-03 09:50:37 +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. --- 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 bfb5595be199..6b6de5d74621 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -465,7 +465,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 *); @@ -4631,7 +4631,7 @@ em_if_vlan_register(if_ctx_t ctx, u16 vtag) if (igb_iov_enabled(sc)) igb_iov_rebuild_vlan(sc); else - em_if_vlan_filter_write(sc); + em_if_vlan_filter_write(sc, index); } } @@ -4666,7 +4666,7 @@ em_if_vlan_unregister(if_ctx_t ctx, u16 vtag) if (igb_iov_enabled(sc)) igb_iov_rebuild_vlan(sc); else - em_if_vlan_filter_write(sc); + em_if_vlan_filter_write(sc, index); } } @@ -4721,7 +4721,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; @@ -4731,8 +4731,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 */