Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2021 21:06:48 GMT
From:      Allan Jude <allanjude@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 57d2eb8896c2 - stable/12 - Use iflib_if_init_locked() during media change instead of iflib_init_locked().
Message-ID:  <202102192106.11JL6mlF086488@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by allanjude:

URL: https://cgit.FreeBSD.org/src/commit/?id=57d2eb8896c2dd9ece7d99415893e2e8a8bfce82

commit 57d2eb8896c2dd9ece7d99415893e2e8a8bfce82
Author:     Allan Jude <allanjude@FreeBSD.org>
AuthorDate: 2021-02-14 18:39:09 +0000
Commit:     Allan Jude <allanjude@FreeBSD.org>
CommitDate: 2021-02-19 21:06:15 +0000

    Use iflib_if_init_locked() during media change instead of iflib_init_locked().
    
    iflib_init_locked() assumes that iflib_stop() has been called, however,
    it is not called for media changes.
    iflib_if_init_locked() calls stop then init, so fixes the problem.
    
    PR:     253473
    Sponsored by:   Juniper Networks, Inc., Klara, Inc.
    
    (cherry picked from commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483)
---
 sys/net/iflib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index ae203d871a5c..f99b076cf0d3 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2577,7 +2577,7 @@ iflib_media_change(if_t ifp)
 
 	CTX_LOCK(ctx);
 	if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0)
-		iflib_init_locked(ctx);
+		iflib_if_init_locked(ctx);
 	CTX_UNLOCK(ctx);
 	return (err);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102192106.11JL6mlF086488>