]>
Commit | Line | Data |
---|---|---|
95244f99 GKH |
1 | From foo@baz Wed Dec 6 17:39:55 CET 2017 |
2 | From: Bryan O'Donoghue <pure.logic@nexus-software.ie> | |
3 | Date: Mon, 6 Nov 2017 01:32:20 +0000 | |
4 | Subject: staging: greybus: loopback: Fix iteration count on async path | |
5 | ||
6 | From: Bryan O'Donoghue <pure.logic@nexus-software.ie> | |
7 | ||
8 | ||
9 | [ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ] | |
10 | ||
11 | Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional | |
12 | support") does what it says on the tin - namely, adds support for | |
13 | asynchronous bi-directional loopback operations. | |
14 | ||
15 | What it neglects to do though is increment the per-connection | |
16 | gb->iteration_count on an asynchronous operation error. This patch fixes | |
17 | that omission. | |
18 | ||
19 | Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") | |
20 | ||
21 | Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> | |
22 | Reported-by: Mitch Tasman <tasman@leaflabs.com> | |
23 | Reviewed-by: Johan Hovold <johan@kernel.org> | |
24 | Cc: Alex Elder <elder@kernel.org> | |
25 | Cc: Mitch Tasman <tasman@leaflabs.com> | |
26 | Cc: greybus-dev@lists.linaro.org | |
27 | Cc: devel@driverdev.osuosl.org | |
28 | Cc: linux-kernel@vger.kernel.org | |
29 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
30 | Signed-off-by: Sasha Levin <alexander.levin@verizon.com> | |
31 | Signed-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) |