git: 6248e7de9d6c - main - igb: Reinitialize through iflib after media changes

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a818e99.25ce8.494c3dab__44420.5211869971$1786875565$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=6248e7de9d6c0f14294afc5792170a68de6a3b53

commit 6248e7de9d6c0f14294afc5792170a68de6a3b53
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-16 06:58:18 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-16 10:18:36 +0000

    igb: Reinitialize through iflib after media changes
    
    A media change can require a complete controller reset.  Resetting the
    controller directly from the admin task leaves iflib rings, filters, and
    interface state programmed for the pre-reset controller.
    
    Request an iflib reset for every media change.  This already was done
    when SR-IOV was active; use the same lifecycle for the ordinary PF case.
    
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
---
 sys/dev/e1000/if_em.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 05e64a9d5013..1622468bd2a0 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -3397,12 +3397,9 @@ em_if_update_admin_status(if_ctx_t ctx)
 		    hw->mac.type >= igb_mac_min) {
 			hw->dev_spec._82575.media_changed = false;
 			sc->flags |= IGB_MEDIA_RESET;
-			if (igb_iov_enabled(sc)) {
-				iflib_request_reset(ctx);
-				iflib_admin_intr_deferred(ctx);
-				reset_requested = true;
-			} else
-				em_reset(ctx);
+			iflib_request_reset(ctx);
+			iflib_admin_intr_deferred(ctx);
+			reset_requested = true;
 		}
 		/* Only do TSO on gigabit for older chips due to errata */
 		if (hw->mac.type < igb_mac_min)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.