diff options
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 8 |
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); |