Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg()
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 1 Jul 2016 23:26:36 +0000 (16:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 11:05:41 +0000 (13:05 +0200)
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 <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/connection.c

index fcf8a02dc0eadb04522ce782be64a37dc8014813..78e6368a4423cfab47d9d697c1510550d1188ad3 100644 (file)
@@ -439,7 +439,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;
@@ -472,9 +472,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;
 }