]> 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)
commit04303c399d4fca8617a9931951991f6a58ee5d66
tree00cada960772aa99e7f04d537feaceb8f51e87e7
parent1ffe67e59f62bf398bbd34d8c706c291f83d4be9
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