summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2017-01-05 05:59:15 +0000
committersephe <sephe@FreeBSD.org>2017-01-05 05:59:15 +0000
commit39ca2a59d0256577dbaaab2b02d90fabd0926f46 (patch)
treed542e47c942d883f3bb69fa9034c1c3175365b41 /sys
parent6ff74921d07a049cb42951b17615dbe3c0f9e70b (diff)
downloadFreeBSD-src-39ca2a59d0256577dbaaab2b02d90fabd0926f46.zip
FreeBSD-src-39ca2a59d0256577dbaaab2b02d90fabd0926f46.tar.gz
MFC 309320
hyperv/storvsc: Don't use timedwait. The timeout is unnecessary. Reviewed by: jhb Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8656
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c38
1 files changed, 6 insertions, 32 deletions
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
index 36751d8..cae9582 100644
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -413,13 +413,7 @@ storvsc_send_multichannel_request(struct storvsc_softc *sc, int max_chans)
VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC,
vstor_packet, VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request);
- /* wait for 5 seconds */
- ret = sema_timedwait(&request->synch_sema, 5 * hz);
- if (ret != 0) {
- printf("Storvsc_error: create multi-channel timeout, %d\n",
- ret);
- return;
- }
+ sema_wait(&request->synch_sema);
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO ||
vstor_packet->status != 0) {
@@ -486,10 +480,7 @@ hv_storvsc_channel_init(struct storvsc_softc *sc)
if (ret != 0)
goto cleanup;
- /* wait 5 seconds */
- ret = sema_timedwait(&request->synch_sema, 5 * hz);
- if (ret != 0)
- goto cleanup;
+ sema_wait(&request->synch_sema);
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO ||
vstor_packet->status != 0) {
@@ -516,11 +507,7 @@ hv_storvsc_channel_init(struct storvsc_softc *sc)
if (ret != 0)
goto cleanup;
- /* wait 5 seconds */
- ret = sema_timedwait(&request->synch_sema, 5 * hz);
-
- if (ret)
- goto cleanup;
+ sema_wait(&request->synch_sema);
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO) {
ret = EINVAL;
@@ -555,11 +542,7 @@ hv_storvsc_channel_init(struct storvsc_softc *sc)
if ( ret != 0)
goto cleanup;
- /* wait 5 seconds */
- ret = sema_timedwait(&request->synch_sema, 5 * hz);
-
- if (ret != 0)
- goto cleanup;
+ sema_wait(&request->synch_sema);
/* TODO: Check returned version */
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO ||
@@ -588,11 +571,7 @@ hv_storvsc_channel_init(struct storvsc_softc *sc)
goto cleanup;
}
- /* wait 5 seconds */
- ret = sema_timedwait(&request->synch_sema, 5 * hz);
-
- if (ret != 0)
- goto cleanup;
+ sema_wait(&request->synch_sema);
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO ||
vstor_packet->status != 0)
@@ -672,12 +651,7 @@ hv_storvsc_host_reset(struct storvsc_softc *sc)
goto cleanup;
}
- ret = sema_timedwait(&request->synch_sema, 5 * hz); /* KYS 5 seconds */
-
- if (ret) {
- goto cleanup;
- }
-
+ sema_wait(&request->synch_sema);
/*
* At this point, all outstanding requests in the adapter
OpenPOWER on IntegriCloud