net: qrtr: mhi: Return error code for wait timeout
During mhi send, wait timeout can happen if qdev->prepared is not set. 0 is returned from this timeout which gets propagated to qrtr_node_enqueue. 0 will be considered as a success case here, so qrtr won't try to resend HELLO packet. Propagate ETIMEDOUT error from MHI layer during wait timeout so that qrtr layer can retry sending HELLO packet in case of this failure. Change-Id: I0869472a900989a4fe4327dc350de4a113965674 Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
This commit is contained in:
parent
3ca296e9bd
commit
7e0b0b0430
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/mhi.h>
|
||||
@ -65,6 +65,8 @@ static int __qcom_mhi_qrtr_send(struct qrtr_endpoint *ep, struct sk_buff *skb)
|
||||
rc = wait_for_completion_interruptible_timeout(&qdev->prepared, msecs_to_jiffies(5000));
|
||||
if (rc <= 0) {
|
||||
pr_err("%s : timeout:%d\n", __func__, rc);
|
||||
if (rc == 0)
|
||||
rc = -ETIMEDOUT;
|
||||
goto free_skb;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user