Return-Path: Received: from mail-pf0-f180.google.com ([209.85.192.180]:35564 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755093AbdDLRob (ORCPT ); Wed, 12 Apr 2017 13:44:31 -0400 Received: by mail-pf0-f180.google.com with SMTP id i5so16975240pfc.2 for ; Wed, 12 Apr 2017 10:44:31 -0700 (PDT) From: Sumit Semwal To: stable@vger.kernel.org Cc: "K. Y. Srinivasan" , Greg Kroah-Hartman , Sumit Semwal Subject: [v2 PATCH for-4.4 10/16] Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg() Date: Wed, 12 Apr 2017 23:13:44 +0530 Message-Id: <1492019030-13567-11-git-send-email-sumit.semwal@linaro.org> In-Reply-To: <1492019030-13567-1-git-send-email-sumit.semwal@linaro.org> References: <1492019030-13567-1-git-send-email-sumit.semwal@linaro.org> Sender: stable-owner@vger.kernel.org List-ID: From: "K. Y. Srinivasan" [ Upstream commit 8de0d7e951826d7592e0ba1da655b175c4aa0923 ] The current delay between retries is unnecessarily high and is negatively affecting the time it takes to boot the system. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sumit Semwal --- drivers/hv/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 4fc2e88..2bbc530 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -429,7 +429,7 @@ int vmbus_post_msg(void *buffer, size_t buflen) union hv_connection_id conn_id; int ret = 0; int retries = 0; - u32 msec = 1; + u32 usec = 1; conn_id.asu32 = 0; conn_id.u.id = VMBUS_MESSAGE_CONNECTION_ID; @@ -462,9 +462,9 @@ int vmbus_post_msg(void *buffer, size_t buflen) } retries++; - msleep(msec); - if (msec < 2048) - msec *= 2; + udelay(usec); + if (usec < 2048) + usec *= 2; } return ret; } -- 2.7.4