index | | raw e-mail
diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index fe278f2029f3..c49948f7c57e 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -807,8 +807,6 @@ igc_if_resume(if_ctx_t ctx)
*/
igc_disable_broken_l1_2(ctx);
- igc_if_init(ctx);
-
return(0);
}
@@ -1288,8 +1286,6 @@ igc_if_media_change(if_ctx_t ctx)
device_printf(sc->dev, "Unsupported media type\n");
}
- igc_if_init(ctx);
-
return (0);
}
@@ -3224,6 +3220,16 @@ igc_set_flowcntl(SYSCTL_HANDLER_ARGS)
return (error);
}
+static void
+igc_sysctl_request_reinit(struct igc_softc *sc)
+{
+ if ((if_getflags(iflib_get_ifp(sc->ctx)) & IFF_UP) == 0)
+ return;
+
+ iflib_request_reset(sc->ctx);
+ iflib_admin_intr_deferred(sc->ctx);
+}
+
/*
* Manage DMA Coalesce:
* Control values:
@@ -3269,7 +3275,7 @@ igc_sysctl_dmac(SYSCTL_HANDLER_ARGS)
return (EINVAL);
}
/* Reinit the interface */
- igc_if_init(sc->ctx);
+ igc_sysctl_request_reinit(sc);
return (error);
}
@@ -3290,7 +3296,7 @@ igc_sysctl_eee(SYSCTL_HANDLER_ARGS)
return (error);
sc->hw.dev_spec._i225.eee_disable = (value != 0);
- igc_if_init(sc->ctx);
+ igc_sysctl_request_reinit(sc);
return (0);
}
home |
help
