Author: sephe
Date: Wed Nov 30 08:21:15 2016
New Revision: 309320
URL: https://svnweb.freebsd.org/changeset/base/309320

Log:
  hyperv/storvsc: Don't use timedwait.
  
  The timeout is unnecessary.
  
  Reviewed by:  jhb
  MFC after:    1 week
  Sponsored by: Microsoft
  Differential Revision:        https://reviews.freebsd.org/D8656

Modified:
  head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c        Wed Nov 30 
08:10:49 2016        (r309319)
+++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c        Wed Nov 30 
08:21:15 2016        (r309320)
@@ -413,13 +413,7 @@ storvsc_send_multichannel_request(struct
            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_s
        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_s
                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_s
        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_s
                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_sof
                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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to