Commit affb1aff authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

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: default avatarK. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a497c3ba
...@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid) ...@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid)
*/ */
do { do {
if (read_state)
hv_begin_read(&channel->inbound); hv_begin_read(&channel->inbound);
channel->onchannel_callback(arg); channel->onchannel_callback(arg);
if (read_state)
bytes_to_read = hv_end_read(&channel->inbound); bytes_to_read = hv_end_read(&channel->inbound);
else
bytes_to_read = 0;
} while (read_state && (bytes_to_read != 0)); } while (read_state && (bytes_to_read != 0));
} else { } else {
pr_err("no channel callback for relid - %u\n", relid); pr_err("no channel callback for relid - %u\n", relid);
......
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