summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/vmbus
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-03-01 02:07:14 +0000
committersephe <sephe@FreeBSD.org>2016-03-01 02:07:14 +0000
commitac1ac2d42e7a8f9700fd91755a11d1f6c9a3fc9b (patch)
tree6cf7988f0c86aca782b70e409cdbf6e7fbc0fa2c /sys/dev/hyperv/vmbus
parent74f3aa2e27c540754f25f7a5eac0f805d757bf3d (diff)
downloadFreeBSD-src-ac1ac2d42e7a8f9700fd91755a11d1f6c9a3fc9b.zip
FreeBSD-src-ac1ac2d42e7a8f9700fd91755a11d1f6c9a3fc9b.tar.gz
MFC [Hyper-V]: r296028
hyperv: Wait 5 seconds for hyperv result, instead of 500ms This addresses various devices (network, stoarge) attach failure. Approved by: re (gjb) Reported by: Hongxiong Xian <v-hoxian microsoft com> Tested by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5435
Diffstat (limited to 'sys/dev/hyperv/vmbus')
-rw-r--r--sys/dev/hyperv/vmbus/hv_channel.c7
-rw-r--r--sys/dev/hyperv/vmbus/hv_connection.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_channel.c b/sys/dev/hyperv/vmbus/hv_channel.c
index 94137fb..7037768 100644
--- a/sys/dev/hyperv/vmbus/hv_channel.c
+++ b/sys/dev/hyperv/vmbus/hv_channel.c
@@ -30,6 +30,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -192,7 +193,7 @@ hv_vmbus_channel_open(
if (ret != 0)
goto cleanup;
- ret = sema_timedwait(&open_info->wait_sema, 500); /* KYS 5 seconds */
+ ret = sema_timedwait(&open_info->wait_sema, 5 * hz); /* KYS 5 seconds */
if (ret) {
if(bootverbose)
@@ -437,7 +438,7 @@ hv_vmbus_channel_establish_gpadl(
}
}
- ret = sema_timedwait(&msg_info->wait_sema, 500); /* KYS 5 seconds*/
+ ret = sema_timedwait(&msg_info->wait_sema, 5 * hz); /* KYS 5 seconds*/
if (ret != 0)
goto cleanup;
@@ -497,7 +498,7 @@ hv_vmbus_channel_teardown_gpdal(
if (ret != 0)
goto cleanup;
- ret = sema_timedwait(&info->wait_sema, 500); /* KYS 5 seconds */
+ ret = sema_timedwait(&info->wait_sema, 5 * hz); /* KYS 5 seconds */
cleanup:
/*
diff --git a/sys/dev/hyperv/vmbus/hv_connection.c b/sys/dev/hyperv/vmbus/hv_connection.c
index a9e3561..cfdc9bb 100644
--- a/sys/dev/hyperv/vmbus/hv_connection.c
+++ b/sys/dev/hyperv/vmbus/hv_connection.c
@@ -30,6 +30,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/lock.h>
@@ -126,7 +127,7 @@ hv_vmbus_negotiate_version(hv_vmbus_channel_msg_info *msg_info,
/**
* Wait for the connection response
*/
- ret = sema_timedwait(&msg_info->wait_sema, 500); /* KYS 5 seconds */
+ ret = sema_timedwait(&msg_info->wait_sema, 5 * hz); /* KYS 5 seconds */
mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock);
TAILQ_REMOVE(
OpenPOWER on IntegriCloud