Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171403470
D8055.id20792.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8055.id20792.diff
View Options
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -334,7 +334,6 @@
static void hn_destroy_tx_data(struct hn_softc *);
static void hn_start_taskfunc(void *, int);
static void hn_start_txeof_taskfunc(void *, int);
-static void hn_stop_tx_tasks(struct hn_softc *);
static int hn_encap(struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **);
static int hn_create_rx_data(struct hn_softc *sc, int);
static void hn_destroy_rx_data(struct hn_softc *sc);
@@ -757,8 +756,6 @@
hn_synth_detach(sc);
HN_UNLOCK(sc);
- hn_stop_tx_tasks(sc);
-
ifmedia_removeall(&sc->hn_media);
hn_destroy_rx_data(sc);
hn_destroy_tx_data(sc);
@@ -2971,19 +2968,6 @@
mtx_unlock(&txr->hn_tx_lock);
}
-static void
-hn_stop_tx_tasks(struct hn_softc *sc)
-{
- int i;
-
- for (i = 0; i < sc->hn_tx_ring_inuse; ++i) {
- struct hn_tx_ring *txr = &sc->hn_tx_ring[i];
-
- taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task);
- taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task);
- }
-}
-
static int
hn_xmit(struct hn_tx_ring *txr, int len)
{
@@ -3571,6 +3555,9 @@
/* Wait for all pending sends to finish. */
while (hn_tx_ring_pending(txr))
pause("hnwtx", 1 /* 1 tick */);
+
+ taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task);
+ taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 11, 10:43 PM (1 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38740143
Default Alt Text
D8055.id20792.diff (1 KB)
Attached To
Mode
D8055: hyperv/hn: Move TX tasks' draining into hn_suspend().
Attached
Detach File
Event Timeline
Log In to Comment