diff options
-rw-r--r-- | drivers/staging/hv/Channel.c | 16 | ||||
-rw-r--r-- | drivers/staging/hv/ChannelMgmt.c | 2 |
2 files changed, 5 insertions, 13 deletions
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index d649ee169d95..746370e82115 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c | |||
@@ -611,7 +611,7 @@ void VmbusChannelClose(struct vmbus_channel *Channel) | |||
611 | 611 | ||
612 | /* Stop callback and cancel the timer asap */ | 612 | /* Stop callback and cancel the timer asap */ |
613 | Channel->OnChannelCallback = NULL; | 613 | Channel->OnChannelCallback = NULL; |
614 | del_timer(&Channel->poll_timer); | 614 | del_timer_sync(&Channel->poll_timer); |
615 | 615 | ||
616 | /* Send a closing message */ | 616 | /* Send a closing message */ |
617 | info = kmalloc(sizeof(*info) + | 617 | info = kmalloc(sizeof(*info) + |
@@ -978,14 +978,10 @@ void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel) | |||
978 | { | 978 | { |
979 | DumpVmbusChannel(Channel); | 979 | DumpVmbusChannel(Channel); |
980 | ASSERT(Channel->OnChannelCallback); | 980 | ASSERT(Channel->OnChannelCallback); |
981 | #ifdef ENABLE_POLLING | 981 | |
982 | del_timer(&Channel->poll_timer); | ||
983 | Channel->OnChannelCallback(Channel->ChannelCallbackContext); | ||
984 | channel->poll_timer.expires(jiffies + usecs_to_jiffies(100); | ||
985 | add_timer(&channel->poll_timer); | ||
986 | #else | ||
987 | Channel->OnChannelCallback(Channel->ChannelCallbackContext); | 982 | Channel->OnChannelCallback(Channel->ChannelCallbackContext); |
988 | #endif | 983 | |
984 | mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100)); | ||
989 | } | 985 | } |
990 | 986 | ||
991 | /** | 987 | /** |
@@ -997,10 +993,6 @@ void VmbusChannelOnTimer(unsigned long data) | |||
997 | 993 | ||
998 | if (channel->OnChannelCallback) { | 994 | if (channel->OnChannelCallback) { |
999 | channel->OnChannelCallback(channel->ChannelCallbackContext); | 995 | channel->OnChannelCallback(channel->ChannelCallbackContext); |
1000 | #ifdef ENABLE_POLLING | ||
1001 | channel->poll_timer.expires(jiffies + usecs_to_jiffies(100); | ||
1002 | add_timer(&channel->poll_timer); | ||
1003 | #endif | ||
1004 | } | 996 | } |
1005 | } | 997 | } |
1006 | 998 | ||
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index 3db62caedcff..ef38467ed4e2 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c | |||
@@ -119,7 +119,7 @@ static inline void ReleaseVmbusChannel(void *context) | |||
119 | */ | 119 | */ |
120 | void FreeVmbusChannel(struct vmbus_channel *Channel) | 120 | void FreeVmbusChannel(struct vmbus_channel *Channel) |
121 | { | 121 | { |
122 | del_timer(&Channel->poll_timer); | 122 | del_timer_sync(&Channel->poll_timer); |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * We have to release the channel's workqueue/thread in the vmbus's | 125 | * We have to release the channel's workqueue/thread in the vmbus's |