diff --git a/sys/net/iflib.c b/sys/net/iflib.c --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -5386,7 +5386,13 @@ goto fail_queues; } + /* + * It prevents a double-locking panic with iflib_media_status when + * the driver loads. + */ + CTX_UNLOCK(ctx); ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); + CTX_LOCK(ctx); if ((err = IFDI_ATTACH_POST(ctx)) != 0) { device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err);