Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa1e40ef authored by Dhoat Harpal's avatar Dhoat Harpal
Browse files

soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink



RX intent no timeout value when waiting for response. This can result
in calling function to wait indefinitely.

Set max waiting time to 500 ms.

CRs-Fixed: 2127311
Change-Id: I30475ca49f107e62bed41d3d26287562574d988c
Signed-off-by: default avatarDhoat Harpal <hdhoat@codeaurora.org>
parent 4867091e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -31,6 +31,7 @@ static int ipc_router_glink_xprt_debug_mask;
module_param_named(debug_mask, ipc_router_glink_xprt_debug_mask,
		   int, 0664);

#define IPCRTR_INTENT_REQ_TIMEOUT_MS 5000
#if defined(DEBUG)
#define D(x...) do { \
if (ipc_router_glink_xprt_debug_mask) \
@@ -602,6 +603,7 @@ static void glink_xprt_ch_open(struct ipc_router_glink_xprt *glink_xprtp)
	open_cfg.notify_state = glink_xprt_notify_state;
	open_cfg.notify_rx_intent_req = glink_xprt_notify_rx_intent_req;
	open_cfg.priv = glink_xprtp;
	open_cfg.rx_intent_req_timeout_ms = IPCRTR_INTENT_REQ_TIMEOUT_MS;

	glink_xprtp->pil = msm_ipc_load_subsystem(glink_xprtp);
	glink_xprtp->ch_hndl =  glink_open(&open_cfg);