diff options
author | sephe <sephe@FreeBSD.org> | 2016-10-12 02:09:53 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-10-12 02:09:53 +0000 |
commit | abbac49956f6e03854c7d1661c708c28e28eb40d (patch) | |
tree | 4d4112d2008e83d8287c38071c1cd0332f21f4f4 /sys/dev/hyperv/utilities/hv_shutdown.c | |
parent | e1a4efcb70d351a2a2be00f017b2ee84aa8ba46b (diff) | |
download | FreeBSD-src-abbac49956f6e03854c7d1661c708c28e28eb40d.zip FreeBSD-src-abbac49956f6e03854c7d1661c708c28e28eb40d.tar.gz |
MFC 302885,302886
302885
hyperv/vmbus: Cleanup channel receiving.
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7202
302886
hyperv/vmbus: Cleanup channel packet receiving.
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7204
Diffstat (limited to 'sys/dev/hyperv/utilities/hv_shutdown.c')
-rw-r--r-- | sys/dev/hyperv/utilities/hv_shutdown.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/hyperv/utilities/hv_shutdown.c b/sys/dev/hyperv/utilities/hv_shutdown.c index 4cca5a6..49b2d87 100644 --- a/sys/dev/hyperv/utilities/hv_shutdown.c +++ b/sys/dev/hyperv/utilities/hv_shutdown.c @@ -67,8 +67,11 @@ hv_shutdown_cb(void *context) softc = (hv_util_sc*)context; buf = softc->receive_buffer;; channel = softc->channel; - ret = hv_vmbus_channel_recv_packet(channel, buf, PAGE_SIZE, - &recv_len, &request_id); + + recv_len = PAGE_SIZE; + ret = vmbus_chan_recv(channel, buf, &recv_len, &request_id); + KASSERT(ret != ENOBUFS, ("hvshutdown recvbuf is not large enough")); + /* XXX check recv_len to make sure that it contains enough data */ if ((ret == 0) && recv_len > 0) { |