X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fhv%2Fhv_util.c;h=bcd06306f3e894a379603a4216cadab475be6b69;hb=HEAD;hp=4aa3cb63fd41f4506254187608c995e22359aa28;hpb=5766e9d25f41d79a0bb99e44a4408d00236dc3c7;p=cascardo%2Flinux.git diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 4aa3cb63fd41..bcd06306f3e8 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -314,10 +314,14 @@ static void heartbeat_onchannelcallback(void *context) u8 *hbeat_txf_buf = util_heartbeat.recv_buffer; struct icmsg_negotiate *negop = NULL; - vmbus_recvpacket(channel, hbeat_txf_buf, - PAGE_SIZE, &recvlen, &requestid); + while (1) { + + vmbus_recvpacket(channel, hbeat_txf_buf, + PAGE_SIZE, &recvlen, &requestid); + + if (!recvlen) + break; - if (recvlen > 0) { icmsghdrp = (struct icmsg_hdr *)&hbeat_txf_buf[ sizeof(struct vmbuspipe_hdr)];