mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
hyperv: Wait 5 seconds for hyperv result, instead of 500ms
This addresses various devices (network, stoarge) attach failure. Reported by: Hongxiong Xian <v-hoxian microsoft com> Tested by: Hongxiong Xian <v-hoxian microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5435
This commit is contained in:
parent
14b5e85b18
commit
f7d33dfef2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296028
@ -352,7 +352,7 @@ hv_rf_send_offload_request(struct hv_device *device,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = sema_timedwait(&request->wait_sema, 500);
|
||||
ret = sema_timedwait(&request->wait_sema, 5 * hz);
|
||||
if (ret != 0) {
|
||||
device_printf(dev, "hv send offload request timeout\n");
|
||||
goto cleanup;
|
||||
@ -619,7 +619,7 @@ hv_rf_set_packet_filter(rndis_device *device, uint32_t new_filter)
|
||||
* us when the response has arrived. In the failure case,
|
||||
* sema_timedwait() returns a non-zero status after waiting 5 seconds.
|
||||
*/
|
||||
ret = sema_timedwait(&request->wait_sema, 500);
|
||||
ret = sema_timedwait(&request->wait_sema, 5 * hz);
|
||||
if (ret == 0) {
|
||||
/* Response received, check status */
|
||||
set_complete = &request->response_msg.msg.set_complete;
|
||||
|
@ -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>
|
||||
@ -194,7 +195,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)
|
||||
@ -439,7 +440,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;
|
||||
|
||||
@ -499,7 +500,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:
|
||||
/*
|
||||
|
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/lock.h>
|
||||
@ -121,7 +122,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(
|
||||
|
Loading…
Reference in New Issue
Block a user