[PATCH AUTOSEL for 4.14 07/51] staging: greybus: loopback: Fix iteration count on async path

2017-11-22 Thread alexander . levin
From: Bryan O'Donoghue 

[ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ]

Commit 12927835d211 ("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: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional 
support")

Signed-off-by: Bryan O'Donoghue 
Reported-by: Mitch Tasman 
Reviewed-by: Johan Hovold 
Cc: Alex Elder 
Cc: Mitch Tasman 
Cc: greybus-...@lists.linaro.org
Cc: de...@driverdev.osuosl.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman 
Signed-off-by: Sasha Levin 
---
 drivers/staging/greybus/loopback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/loopback.c 
b/drivers/staging/greybus/loopback.c
index 08e255884206..93e86798ec1c 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -1042,8 +1042,10 @@ static int gb_loopback_fn(void *data)
else if (type == GB_LOOPBACK_TYPE_SINK)
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)
-- 
2.11.0
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH AUTOSEL for 4.9 04/24] staging: greybus: loopback: Fix iteration count on async path

2017-11-22 Thread alexander . levin
From: Bryan O'Donoghue 

[ Upstream commit 44b02da39210e6dd67e39ff1f48d30c56d384240 ]

Commit 12927835d211 ("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: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional 
support")

Signed-off-by: Bryan O'Donoghue 
Reported-by: Mitch Tasman 
Reviewed-by: Johan Hovold 
Cc: Alex Elder 
Cc: Mitch Tasman 
Cc: greybus-...@lists.linaro.org
Cc: de...@driverdev.osuosl.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman 
Signed-off-by: Sasha Levin 
---
 drivers/staging/greybus/loopback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/loopback.c 
b/drivers/staging/greybus/loopback.c
index 29dc249b0c74..3c2c233c2e49 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -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)
-- 
2.11.0
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel