summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/es2.c
diff options
context:
space:
mode:
authorJohan Hovold2016-07-27 16:37:22 +0200
committerGreg Kroah-Hartman2016-07-28 19:04:06 +0200
commitc0219cbf72418d5355e319a0d787dc2671df9d4f (patch)
tree1cf562fb2c94e9393a85fa94dd6b9a4b2628ce05 /drivers/staging/greybus/es2.c
parentgreybus: es2: fix arpc error message (diff)
downloadkernel-qcow2-linux-c0219cbf72418d5355e319a0d787dc2671df9d4f.tar.gz
kernel-qcow2-linux-c0219cbf72418d5355e319a0d787dc2671df9d4f.tar.xz
kernel-qcow2-linux-c0219cbf72418d5355e319a0d787dc2671df9d4f.zip
greybus: es2: fix arpc active-list corruption
Fix ARPC active-list corruption due to incorrect list-interface usage. The corruption manifested itself as ARPC timeouts due to expected responses not being recognised whenever more than one ARPC was active. This could be seen for example when two interfaces were being runtime suspended in parallel: [ 165.739896] usb 1-1.1: invalid arpc response id received: 13 [ 165.794743] greybus 1-5.5: gb_interface_refclk_set - 0 [ 166.241202] usb 1-1.1: failed to execute ARPC: -110 Fortunately the impact of this bug has so far been limited to such timeouts and error messages due to ARPC currently only being used for CPort reset in the connection tear-down path. Reported-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r--drivers/staging/greybus/es2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index a22cb67a9076..2020187b5d16 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -1142,7 +1142,7 @@ static void arpc_add(struct es2_ap_dev *es2, struct arpc *rpc)
{
rpc->active = true;
rpc->req->id = cpu_to_le16(es2->arpc_id_cycle++);
- list_add_tail(&es2->arpcs, &rpc->list);
+ list_add_tail(&rpc->list, &es2->arpcs);
}
static void arpc_del(struct es2_ap_dev *es2, struct arpc *rpc)