diff -r 45046906401c sys/dev/cxgbe/t4_main.c --- a/sys/dev/cxgbe/t4_main.c Sun Aug 06 13:56:06 2017 -0700 +++ b/sys/dev/cxgbe/t4_main.c Mon Aug 07 12:34:02 2017 -0700 @@ -4227,6 +4227,14 @@ cxgbe_init_synchronized(struct vi_info * if (rc) goto done; /* error message displayed already */ + PORT_LOCK(pi); + if (pi->up_vis++ == 0) { + t4_update_port_info(pi); + build_medialist(vi->pi, &vi->media); + init_l1cfg(pi); + } + PORT_UNLOCK(pi); + rc = -t4_enable_vi(sc, sc->mbox, vi->viid, true, true); if (rc != 0) { if_printf(ifp, "enable_vi failed: %d\n", rc); @@ -4257,11 +4265,6 @@ cxgbe_init_synchronized(struct vi_info * /* all ok */ PORT_LOCK(pi); - if (pi->up_vis++ == 0) { - t4_update_port_info(pi); - build_medialist(vi->pi, &vi->media); - init_l1cfg(pi); - } ifp->if_drv_flags |= IFF_DRV_RUNNING; if (pi->nvi > 1 || sc->flags & IS_VF)