]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.68/staging-greybus-loopback-fix-iteration-count-on-async-path.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.68 / staging-greybus-loopback-fix-iteration-count-on-async-path.patch
CommitLineData
95244f99
GKH
1From foo@baz Wed Dec 6 17:39:55 CET 2017
2From: Bryan O'Donoghue <pure.logic@nexus-software.ie>
3Date: Mon, 6 Nov 2017 01:32:20 +0000
4Subject: staging: greybus: loopback: Fix iteration count on async path
5
6From: Bryan O'Donoghue <pure.logic@nexus-software.ie>
7
8
9[ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ]
10
11Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional
12support") does what it says on the tin - namely, adds support for
13asynchronous bi-directional loopback operations.
14
15What it neglects to do though is increment the per-connection
16gb->iteration_count on an asynchronous operation error. This patch fixes
17that omission.
18
19Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support")
20
21Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
22Reported-by: Mitch Tasman <tasman@leaflabs.com>
23Reviewed-by: Johan Hovold <johan@kernel.org>
24Cc: Alex Elder <elder@kernel.org>
25Cc: Mitch Tasman <tasman@leaflabs.com>
26Cc: greybus-dev@lists.linaro.org
27Cc: devel@driverdev.osuosl.org
28Cc: linux-kernel@vger.kernel.org
29Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32---
33 drivers/staging/greybus/loopback.c | 4 +++-
34 1 file changed, 3 insertions(+), 1 deletion(-)
35
36--- a/drivers/staging/greybus/loopback.c
37+++ b/drivers/staging/greybus/loopback.c
38@@ -1034,8 +1034,10 @@ static int gb_loopback_fn(void *data)
39 error = gb_loopback_async_sink(gb, size);
40 }
41
42- if (error)
43+ if (error) {
44 gb->error++;
45+ gb->iteration_count++;
46+ }
47 } else {
48 /* We are effectively single threaded here */
49 if (type == GB_LOOPBACK_TYPE_PING)