aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/connection.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2014-07-07 19:34:24 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 17:34:35 -0400
commitaffb1aff300ddee54df307812b38f166e8a865ef (patch)
tree5ed22f268bf37d50d511d54a477824a8573648c2 /drivers/hv/connection.c
parenta497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff)
Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
Starting with Win8, we have implemented several optimizations to improve the scalability and performance of the VMBUS transport between the Host and the Guest. Some of the non-performance critical services cannot leverage these optimization since they only read and process one message at a time. Make adjustments to the callback dispatch code to account for the way non-performance critical drivers handle reading of the channel. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r--drivers/hv/connection.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index e84f4526eb36..ae22e3c1fc4c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid)
339 */ 339 */
340 340
341 do { 341 do {
342 hv_begin_read(&channel->inbound); 342 if (read_state)
343 hv_begin_read(&channel->inbound);
343 channel->onchannel_callback(arg); 344 channel->onchannel_callback(arg);
344 bytes_to_read = hv_end_read(&channel->inbound); 345 if (read_state)
346 bytes_to_read = hv_end_read(&channel->inbound);
347 else
348 bytes_to_read = 0;
345 } while (read_state && (bytes_to_read != 0)); 349 } while (read_state && (bytes_to_read != 0));
346 } else { 350 } else {
347 pr_err("no channel callback for relid - %u\n", relid); 351 pr_err("no channel callback for relid - %u\n", relid);