Date: Tue, 1 Mar 2016 02:07:14 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296248 - in stable/10/sys/dev/hyperv: netvsc vmbus Message-ID: <201603010207.u2127E7X082027@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Tue Mar 1 02:07:14 2016 New Revision: 296248 URL: https://svnweb.freebsd.org/changeset/base/296248 Log: 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 Modified: stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c stable/10/sys/dev/hyperv/vmbus/hv_channel.c stable/10/sys/dev/hyperv/vmbus/hv_connection.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c Tue Mar 1 01:04:53 2016 (r296247) +++ stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c Tue Mar 1 02:07:14 2016 (r296248) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/kernel.h> #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/lock.h> @@ -358,7 +359,7 @@ hv_rf_send_offload_request(struct hv_dev 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; @@ -625,7 +626,7 @@ hv_rf_set_packet_filter(rndis_device *de * 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; Modified: stable/10/sys/dev/hyperv/vmbus/hv_channel.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/hv_channel.c Tue Mar 1 01:04:53 2016 (r296247) +++ stable/10/sys/dev/hyperv/vmbus/hv_channel.c Tue Mar 1 02:07:14 2016 (r296248) @@ -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: /* Modified: stable/10/sys/dev/hyperv/vmbus/hv_connection.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/hv_connection.c Tue Mar 1 01:04:53 2016 (r296247) +++ stable/10/sys/dev/hyperv/vmbus/hv_connection.c Tue Mar 1 02:07:14 2016 (r296248) @@ -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_chan /** * 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(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603010207.u2127E7X082027>