Author: sephe
Date: Thu Jan  5 05:59:15 2017
New Revision: 311370
URL: https://svnweb.freebsd.org/changeset/base/311370

Log:
  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

Modified:
  stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
==============================================================================
--- stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c   Thu Jan  5 
05:54:22 2017        (r311369)
+++ stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c   Thu Jan  5 
05:59:15 2017        (r311370)
@@ -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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to