]> git.baikalelectronics.ru Git - kernel.git/commit
hv_utils: drain the timesync packets on onchannelcallback
authorVineeth Pillai <viremana@linux.microsoft.com>
Fri, 21 Aug 2020 15:28:49 +0000 (15:28 +0000)
committerWei Liu <wei.liu@kernel.org>
Mon, 24 Aug 2020 14:49:04 +0000 (14:49 +0000)
commit09e7e89ee0d6584fa97e9742ffeacd8e741a3580
tree00cada960772aa99e7f04d537feaceb8f51e87e7
parent33fa911fa0adce1ded3a58ce34f82352a664eb0a
hv_utils: drain the timesync packets on onchannelcallback

There could be instances where a system stall prevents the timesync
packets to be consumed. And this might lead to more than one packet
pending in the ring buffer. Current code empties one packet per callback
and it might be a stale one. So drain all the packets from ring buffer
on each callback.

Signed-off-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/hv_util.c