From f6f2e0ce382e98a260bf948cd21fb55f4f7c2898 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Mon, 28 Nov 2016 05:15:28 +0000 Subject: [PATCH] hyperv/hn: Utilize vmbus_chan_xact_wait MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8612 --- sys/dev/hyperv/netvsc/hn_nvs.c | 6 ++---- sys/dev/hyperv/netvsc/hn_rndis.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/dev/hyperv/netvsc/hn_nvs.c b/sys/dev/hyperv/netvsc/hn_nvs.c index 4a4434023397..0c60f8a8ac24 100644 --- a/sys/dev/hyperv/netvsc/hn_nvs.c +++ b/sys/dev/hyperv/netvsc/hn_nvs.c @@ -109,10 +109,8 @@ hn_nvs_xact_execute(struct hn_softc *sc, struct vmbus_xact *xact, vmbus_xact_deactivate(xact); return (NULL); } - if (HN_CAN_SLEEP(sc)) - hdr = vmbus_xact_wait(xact, &resplen); - else - hdr = vmbus_xact_busywait(xact, &resplen); + hdr = vmbus_chan_xact_wait(sc->hn_prichan, xact, &resplen, + HN_CAN_SLEEP(sc)); /* * Check this NVS response message. diff --git a/sys/dev/hyperv/netvsc/hn_rndis.c b/sys/dev/hyperv/netvsc/hn_rndis.c index fa749d31bb96..1f167e12b138 100644 --- a/sys/dev/hyperv/netvsc/hn_rndis.c +++ b/sys/dev/hyperv/netvsc/hn_rndis.c @@ -232,10 +232,8 @@ hn_rndis_xact_exec1(struct hn_softc *sc, struct vmbus_xact *xact, size_t reqlen, if_printf(sc->hn_ifp, "RNDIS ctrl send failed: %d\n", error); return (NULL); } - if (HN_CAN_SLEEP(sc)) - return (vmbus_xact_wait(xact, comp_len)); - else - return (vmbus_xact_busywait(xact, comp_len)); + return (vmbus_chan_xact_wait(sc->hn_prichan, xact, comp_len, + HN_CAN_SLEEP(sc))); } static const void *