Drivers: hv_vmbus: Fix signal to host condition
authorChristopher Oo <t-chriso@microsoft.com>
Wed, 5 Aug 2015 07:52:40 +0000 (00:52 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 17 May 2016 17:42:54 +0000 (13:42 -0400)
commit26ac029f2468a529bf5c9c3a5d9ef7a27376218a
tree4376934fada394e7aeb2bb310f0404d70ef6a708
parent3807acbd300b39054d45460b19067ce7ef8b1ae9
Drivers: hv_vmbus: Fix signal to host condition

[ Upstream commit a5cca686ce0ef4909deaee4ed46dd991e3a9ece4 ]

Fixes a bug where previously hv_ringbuffer_read would pass in the old
number of bytes available to read instead of the expected old read index
when calculating when to signal to the host that the ringbuffer is empty.
Since the previous write size is already saved, also changes the
hv_need_to_signal_on_read to use the previously read value rather than
recalculating it.

Signed-off-by: Christopher Oo <t-chriso@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/hv/ring_buffer.c