Commit c0219cbf authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 178457e1
......@@ -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)
......
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