diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 05827eccc53a..ce5a9f2584f3 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -319,9 +319,13 @@ static void process_chn_event(u32 relid) */ do { - hv_begin_read(&channel->inbound); + if (read_state) + hv_begin_read(&channel->inbound); channel->onchannel_callback(arg); - bytes_to_read = hv_end_read(&channel->inbound); + if (read_state) + bytes_to_read = hv_end_read(&channel->inbound); + else + bytes_to_read = 0; } while (read_state && (bytes_to_read != 0)); } else { pr_err("no channel callback for relid - %u\n", relid);