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>
#include "kernel_ver.h"
#include "connection.h"
#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
/* Fixed CPort numbers */
#define ES2_CPORT_CDSI0 16
#define ES2_CPORT_CDSI1 17
req.cport_id = cpu_to_le16(cport_id);
retval = arpc_sync(es2, ARPC_TYPE_CPORT_RESET, &req, sizeof(req),
req.cport_id = cpu_to_le16(cport_id);
retval = arpc_sync(es2, ARPC_TYPE_CPORT_RESET, &req, sizeof(req),
+ &result, ES2_ARPC_CPORT_TIMEOUT);
if (retval == -EREMOTEIO) {
dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id,
result);
if (retval == -EREMOTEIO) {
dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id,
result);