From 8124601f7090e9c8643177761c10397f9acf45b3 Mon Sep 17 00:00:00 2001 From: sephe Date: Mon, 28 Nov 2016 07:44:50 +0000 Subject: [PATCH] hyperv/vmbus: Add exec cancel support for message Hypercall API. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8635 --- sys/dev/hyperv/vmbus/vmbus.c | 7 +++++++ sys/dev/hyperv/vmbus/vmbus_var.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index ece7299bf52c..6007864b5598 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -307,6 +307,13 @@ vmbus_msghc_exec(struct vmbus_softc *sc __unused, struct vmbus_msghc *mh) return error; } +void +vmbus_msghc_exec_cancel(struct vmbus_softc *sc __unused, struct vmbus_msghc *mh) +{ + + vmbus_xact_deactivate(mh->mh_xact); +} + const struct vmbus_message * vmbus_msghc_wait_result(struct vmbus_softc *sc __unused, struct vmbus_msghc *mh) { diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index b5967d5aa018..cd9fb33cd411 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -157,6 +157,8 @@ void vmbus_msghc_put(struct vmbus_softc *, struct vmbus_msghc *); void *vmbus_msghc_dataptr(struct vmbus_msghc *); int vmbus_msghc_exec_noresult(struct vmbus_msghc *); int vmbus_msghc_exec(struct vmbus_softc *, struct vmbus_msghc *); +void vmbus_msghc_exec_cancel(struct vmbus_softc *, + struct vmbus_msghc *); const struct vmbus_message * vmbus_msghc_wait_result(struct vmbus_softc *, struct vmbus_msghc *);