Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Sep 2021 16:15:45 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6b2ff27cb952 - main - mge(4): Mark sysctls and callout MP-safe.
Message-ID:  <202109031615.183GFjXZ021591@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=6b2ff27cb952048527ba13023a8354112fe1d410

commit 6b2ff27cb952048527ba13023a8354112fe1d410
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2021-09-03 16:13:56 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2021-09-03 16:15:39 +0000

    mge(4): Mark sysctls and callout MP-safe.
    
    MFC after:      1 month
---
 sys/dev/mge/if_mge.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c
index 16deb330c06c..c43163afe3a7 100644
--- a/sys/dev/mge/if_mge.c
+++ b/sys/dev/mge/if_mge.c
@@ -883,7 +883,7 @@ mge_attach(device_t dev)
 
 	mge_get_mac_address(sc, hwaddr);
 	ether_ifattach(ifp, hwaddr);
-	callout_init(&sc->wd_callout, 0);
+	callout_init(&sc->wd_callout, 1);
 
 	/* Attach PHY(s) */
 	if (sc->phy_attached) {
@@ -2147,10 +2147,10 @@ mge_add_sysctls(struct mge_softc *sc)
 	children = SYSCTL_CHILDREN(tree);
 
 	SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rx_time",
-	    CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, MGE_IC_RX,
+	    CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, MGE_IC_RX,
 	    mge_sysctl_ic, "I", "IC RX time threshold");
 	SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tx_time",
-	    CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, MGE_IC_TX,
+	    CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, MGE_IC_TX,
 	    mge_sysctl_ic, "I", "IC TX time threshold");
 }
 



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