X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=drivers%2Fhv%2Fconnection.c;h=ae22e3c1fc4c189f675b1ccd2c18cf90d5d4d8fc;hb=59ca9ee42838d0f597137cf811e47eaf42fdcb69;hp=e84f4526eb36aaad44e8177febfaabde7efc2e81;hpb=4251c2a67011801caecd63671f26dd8c9aedb24c;p=karo-tx-linux.git 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) */ 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);