diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-08-03 14:09:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-08-03 15:42:38 +0200 |
commit | 54f34e1e4d065ea38f531341018b41c590d71861 (patch) | |
tree | 57d81bae2e4610eae8d9ed3dc76a29ef9b69cecc /drivers/staging/greybus/es2.c | |
parent | 121bae2bec47a9944049f2583b1d31f479110f0f (diff) |
greybus: es2: add define for ARPC CPort requests
Add dedicated define for ARPC CPort requests instead of using the
default timeout for USB vendor requests.
We still allow responses to take 500 ms to arrive, but note that this
adds on top of the 500ms already allowed for a requests to be
acknowledged. This should probably be tightened up at some point.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r-- | drivers/staging/greybus/es2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index 8d0e52d46a2b..66fd92d84e2a 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -19,6 +19,10 @@ #include "kernel_ver.h" #include "connection.h" + +/* Default timeout for ARPC CPort requests */ +#define ES2_ARPC_CPORT_TIMEOUT 500 + /* Fixed CPort numbers */ #define ES2_CPORT_CDSI0 16 #define ES2_CPORT_CDSI1 17 @@ -622,7 +626,7 @@ static int cport_reset(struct gb_host_device *hd, u16 cport_id) req.cport_id = cpu_to_le16(cport_id); retval = arpc_sync(es2, ARPC_TYPE_CPORT_RESET, &req, sizeof(req), - &result, ES2_TIMEOUT); + &result, ES2_ARPC_CPORT_TIMEOUT); if (retval == -EREMOTEIO) { dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id, result); |