Commit b4362c9c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: osd: remove Sleep wrapper

Use the "real" udelay call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3bcfa888
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/delay.h>
#include "include/logging.h" #include "include/logging.h"
#include "NetVsc.h" #include "NetVsc.h"
#include "RndisFilter.h" #include "RndisFilter.h"
...@@ -200,7 +201,7 @@ static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device) ...@@ -200,7 +201,7 @@ static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device)
// Busy wait until the ref drop to 2, then set it to 1 // Busy wait until the ref drop to 2, then set it to 1
while (InterlockedCompareExchange(&netDevice->RefCount, 1, 2) != 2) while (InterlockedCompareExchange(&netDevice->RefCount, 1, 2) != 2)
{ {
Sleep(100); udelay(100);
} }
return netDevice; return netDevice;
...@@ -217,7 +218,7 @@ static inline NETVSC_DEVICE* ReleaseInboundNetDevice(DEVICE_OBJECT *Device) ...@@ -217,7 +218,7 @@ static inline NETVSC_DEVICE* ReleaseInboundNetDevice(DEVICE_OBJECT *Device)
// Busy wait until the ref drop to 1, then set it to 0 // Busy wait until the ref drop to 1, then set it to 0
while (InterlockedCompareExchange(&netDevice->RefCount, 0, 1) != 1) while (InterlockedCompareExchange(&netDevice->RefCount, 0, 1) != 1)
{ {
Sleep(100); udelay(100);
} }
Device->Extension = NULL; Device->Extension = NULL;
...@@ -923,7 +924,7 @@ NetVscOnDeviceRemove( ...@@ -923,7 +924,7 @@ NetVscOnDeviceRemove(
{ {
DPRINT_INFO(NETVSC, "waiting for %d requests to complete...", netDevice->NumOutstandingSends); DPRINT_INFO(NETVSC, "waiting for %d requests to complete...", netDevice->NumOutstandingSends);
Sleep(100); udelay(100);
} }
DPRINT_INFO(NETVSC, "Disconnecting from netvsp..."); DPRINT_INFO(NETVSC, "Disconnecting from netvsp...");
...@@ -1318,7 +1319,7 @@ NetVscSendReceiveCompletion( ...@@ -1318,7 +1319,7 @@ NetVscSendReceiveCompletion(
if (retries < 4) if (retries < 4)
{ {
Sleep(100); udelay(100);
goto retry_send_cmplt; goto retry_send_cmplt;
} }
else else
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/delay.h>
#include "include/logging.h" #include "include/logging.h"
#include "include/StorVscApi.h" #include "include/StorVscApi.h"
...@@ -225,7 +226,7 @@ static inline STORVSC_DEVICE* ReleaseStorDevice(DEVICE_OBJECT *Device) ...@@ -225,7 +226,7 @@ static inline STORVSC_DEVICE* ReleaseStorDevice(DEVICE_OBJECT *Device)
// Busy wait until the ref drop to 2, then set it to 1 // Busy wait until the ref drop to 2, then set it to 1
while (InterlockedCompareExchange(&storDevice->RefCount, 1, 2) != 2) while (InterlockedCompareExchange(&storDevice->RefCount, 1, 2) != 2)
{ {
Sleep(100); udelay(100);
} }
return storDevice; return storDevice;
...@@ -242,7 +243,7 @@ static inline STORVSC_DEVICE* FinalReleaseStorDevice(DEVICE_OBJECT *Device) ...@@ -242,7 +243,7 @@ static inline STORVSC_DEVICE* FinalReleaseStorDevice(DEVICE_OBJECT *Device)
// Busy wait until the ref drop to 1, then set it to 0 // Busy wait until the ref drop to 1, then set it to 0
while (InterlockedCompareExchange(&storDevice->RefCount, 0, 1) != 1) while (InterlockedCompareExchange(&storDevice->RefCount, 0, 1) != 1)
{ {
Sleep(100); udelay(100);
} }
Device->Extension = NULL; Device->Extension = NULL;
...@@ -582,7 +583,7 @@ StorVscOnDeviceRemove( ...@@ -582,7 +583,7 @@ StorVscOnDeviceRemove(
{ {
DPRINT_INFO(STORVSC, "waiting for %d requests to complete...", storDevice->NumOutstandingRequests); DPRINT_INFO(STORVSC, "waiting for %d requests to complete...", storDevice->NumOutstandingRequests);
Sleep(100); udelay(100);
} }
DPRINT_INFO(STORVSC, "removing storage device (%p)...", Device->Extension); DPRINT_INFO(STORVSC, "removing storage device (%p)...", Device->Extension);
......
...@@ -110,8 +110,6 @@ extern int InterlockedIncrement(int *val); ...@@ -110,8 +110,6 @@ extern int InterlockedIncrement(int *val);
extern int InterlockedDecrement(int *val); extern int InterlockedDecrement(int *val);
extern int InterlockedCompareExchange(int *val, int new, int curr); extern int InterlockedCompareExchange(int *val, int new, int curr);
extern void Sleep(unsigned long usecs);
extern void* VirtualAllocExec(unsigned int size); extern void* VirtualAllocExec(unsigned int size);
extern void VirtualFree(void* VirtAddr); extern void VirtualFree(void* VirtAddr);
......
...@@ -131,11 +131,6 @@ int InterlockedCompareExchange(int *val, int new, int curr) ...@@ -131,11 +131,6 @@ int InterlockedCompareExchange(int *val, int new, int curr)
} }
void Sleep(unsigned long usecs)
{
udelay(usecs);
}
void* VirtualAllocExec(unsigned int size) void* VirtualAllocExec(unsigned int size)
{ {
#ifdef __x86_64__ #ifdef __x86_64__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment