Commit 9e2f2c4f authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

staging: most: fix tracking of MBO offset



This patch increments mbo_offs by the number of bytes that have
been copied and resets it in case a complete mbo has been transferred
to user buffer.

Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8a742f78
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -257,9 +257,8 @@ start_copy:

	copied = to_copy - not_copied;

	if (count < mbo->processed_length) {
		channel->mbo_offs = copied;
	} else {
	channel->mbo_offs += copied;
	if (channel->mbo_offs >= mbo->processed_length) {
		most_put_mbo(mbo);
		channel->mbo_offs = 0;
		channel->stacked_mbo = NULL;