From owner-svn-src-head@freebsd.org Wed Nov 30 08:21:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C3B2C5D769; Wed, 30 Nov 2016 08:21:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14251B63; Wed, 30 Nov 2016 08:21:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAU8LGl0024498; Wed, 30 Nov 2016 08:21:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAU8LGOQ024497; Wed, 30 Nov 2016 08:21:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611300821.uAU8LGOQ024497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 30 Nov 2016 08:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309320 - head/sys/dev/hyperv/storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2016 08:21:17 -0000 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