aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv/netvsc
diff options
context:
space:
mode:
authorSepherosa Ziehau <sephe@FreeBSD.org>2016-12-28 03:19:59 +0000
committerSepherosa Ziehau <sephe@FreeBSD.org>2016-12-28 03:19:59 +0000
commit87f8129d282d8d36cced2176163930862251c5cb (patch)
tree8ae1038eed8997c065c87626974ad7aa7745ddb7 /sys/dev/hyperv/netvsc
parent69d2eb82d74e8a858af7e7791a86b344f79a24ee (diff)
Notes
Diffstat (limited to 'sys/dev/hyperv/netvsc')
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index 90b5a852b7c0c..85a57e35b99dc 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -2367,9 +2367,6 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
- /* Disable polling. */
- hn_polling(sc, 0);
-
/*
* Suspend this interface before the synthetic parts
* are ripped.
@@ -2415,13 +2412,6 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
*/
hn_resume(sc);
- /*
- * Re-enable polling if this interface is running and
- * the polling is requested.
- */
- if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && sc->hn_pollhz > 0)
- hn_polling(sc, sc->hn_pollhz);
-
HN_UNLOCK(sc);
break;
@@ -4900,6 +4890,9 @@ static void
hn_suspend(struct hn_softc *sc)
{
+ /* Disable polling. */
+ hn_polling(sc, 0);
+
if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING)
hn_suspend_data(sc);
hn_suspend_mgmt(sc);
@@ -4992,6 +4985,13 @@ hn_resume(struct hn_softc *sc)
if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING)
hn_resume_data(sc);
hn_resume_mgmt(sc);
+
+ /*
+ * Re-enable polling if this interface is running and
+ * the polling is requested.
+ */
+ if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) && sc->hn_pollhz > 0)
+ hn_polling(sc, sc->hn_pollhz);
}
static void