From e41136c060eb7a4290a64a3a23f98e3c1655a104 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Wed, 19 Oct 2016 09:12:14 +0000 Subject: [PATCH] hyperv/vmbus: Expose channel management taskqueue for driver to use. MFC after: 3 days Sponsored by: Microsoft --- sys/dev/hyperv/include/vmbus.h | 3 +++ sys/dev/hyperv/vmbus/vmbus_chan.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/hyperv/include/vmbus.h b/sys/dev/hyperv/include/vmbus.h index e4cb78e60428..4dd0a9a39b19 100644 --- a/sys/dev/hyperv/include/vmbus.h +++ b/sys/dev/hyperv/include/vmbus.h @@ -118,6 +118,7 @@ struct vmbus_chan_br { struct vmbus_channel; struct hyperv_guid; struct task; +struct taskqueue; typedef void (*vmbus_chan_callback_t)(struct vmbus_channel *, void *); @@ -179,5 +180,7 @@ int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max, int dlen_max); bool vmbus_chan_rx_empty(const struct vmbus_channel *chan); bool vmbus_chan_tx_empty(const struct vmbus_channel *chan); +struct taskqueue * + vmbus_chan_mgmt_tq(const struct vmbus_channel *chan); #endif /* !_VMBUS_H_ */ diff --git a/sys/dev/hyperv/vmbus/vmbus_chan.c b/sys/dev/hyperv/vmbus/vmbus_chan.c index 34b07eeff735..a889962b0b49 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chan.c +++ b/sys/dev/hyperv/vmbus/vmbus_chan.c @@ -1721,3 +1721,10 @@ vmbus_chan_run_task(struct vmbus_channel *chan, struct task *task) taskqueue_enqueue(chan->ch_tq, task); taskqueue_drain(chan->ch_tq, task); } + +struct taskqueue * +vmbus_chan_mgmt_tq(const struct vmbus_channel *chan) +{ + + return (chan->ch_mgmt_tq); +}