Commit e5f2421d authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Greg Kroah-Hartman

staging: greybus: loopback: Fix iteration count on async path


[ Upstream commit 44b02da3 ]

Commit 12927835 ("greybus: loopback: Add asynchronous bi-directional
support") does what it says on the tin - namely, adds support for
asynchronous bi-directional loopback operations.

What it neglects to do though is increment the per-connection
gb->iteration_count on an asynchronous operation error. This patch fixes
that omission.

Fixes: 12927835 ("greybus: loopback: Add asynchronous bi-directional support")
Signed-off-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
Reported-by: default avatarMitch Tasman <tasman@leaflabs.com>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Mitch Tasman <tasman@leaflabs.com>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8a95afc4
......@@ -1034,8 +1034,10 @@ static int gb_loopback_fn(void *data)
error = gb_loopback_async_sink(gb, size);
}
if (error)
if (error) {
gb->error++;
gb->iteration_count++;
}
} else {
/* We are effectively single threaded here */
if (type == GB_LOOPBACK_TYPE_PING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment