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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 18:44:29 +0000 (11:44 -0700)
commita5cca686ce0ef4909deaee4ed46dd991e3a9ece4
tree8cda77f7a794524d59af528b338fffcee28f296b
parent3b71107d73b16074afa7658f3f0fcf837aabfe24
Drivers: hv_vmbus: Fix signal to host condition

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>
drivers/hv/ring_buffer.c