From ec3eaa6fb073313c68c3c4f297faac3fcc5227ff Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Wed, 28 Sep 2016 05:01:53 +0000 Subject: [PATCH] hyperv/hn: Reorder the comment a little bit. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8048 --- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index 816f2c72718..cff9beb03d8 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -3580,16 +3580,18 @@ hn_suspend(struct hn_softc *sc) */ hv_rf_on_close(sc); - /* Give RNDIS enough time to flush all pending data packets. */ + /* + * Give RNDIS enough time to flush all pending data packets. + */ pause("waitrx", (200 * hz) / 1000); - nsubch = sc->hn_rx_ring_inuse - 1; - if (nsubch > 0) - subch = vmbus_subchan_get(sc->hn_prichan, nsubch); - /* * Drain RX/TX bufrings and interrupts. */ + nsubch = sc->hn_rx_ring_inuse - 1; + if (nsubch > 0) + subch = vmbus_subchan_get(sc->hn_prichan, nsubch); + if (subch != NULL) { for (i = 0; i < nsubch; ++i) hn_rx_drain(subch[i]);