Loading drivers/soc/qcom/qmi_interface.c +17 −0 Original line number Diff line number Diff line Loading @@ -454,6 +454,7 @@ static void qmi_handle_net_reset(struct qmi_handle *qmi) struct sockaddr_qrtr sq; struct qmi_service *svc; struct socket *sock; long timeo = qmi->sock->sk->sk_sndtimeo; sock = qmi_sock_create(qmi, &sq); if (IS_ERR(sock)) Loading @@ -473,6 +474,7 @@ static void qmi_handle_net_reset(struct qmi_handle *qmi) sock_release(qmi->sock); qmi->sock = sock; qmi->sq = sq; qmi->sock->sk->sk_sndtimeo = timeo; mutex_unlock(&qmi->sock_lock); list_for_each_entry(svc, &qmi->lookups, list_node) Loading Loading @@ -623,6 +625,21 @@ static struct socket *qmi_sock_create(struct qmi_handle *qmi, return sock; } /** * qmi_set_sndtimeo() - set the sk_sndtimeo of the qmi handle * @qmi: QMI client handle * @timeo: timeout in jiffies. * * This sets the timeout for the blocking socket send in qmi send. */ void qmi_set_sndtimeo(struct qmi_handle *qmi, long timeo) { mutex_lock(&qmi->sock_lock); qmi->sock->sk->sk_sndtimeo = timeo; mutex_unlock(&qmi->sock_lock); } EXPORT_SYMBOL(qmi_set_sndtimeo); /** * qmi_handle_init() - initialize a QMI client handle * @qmi: QMI handle to initialize Loading drivers/soc/qcom/sysmon-qmi.c +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019, 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 Loading Loading @@ -655,6 +655,7 @@ int sysmon_notifier_register(struct subsys_desc *desc) kfree(data); return rc; } qmi_set_sndtimeo(&data->clnt_handle, HZ); qmi_add_lookup(&data->clnt_handle, SSCTL_SERVICE_ID, SSCTL_VER_2, data->instance_id); Loading include/linux/soc/qcom/qmi.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2017, Linaro Ltd. * * This program is free software; you can redistribute it and/or modify Loading Loading @@ -275,5 +275,6 @@ int qmi_txn_init(struct qmi_handle *qmi, struct qmi_txn *txn, struct qmi_elem_info *ei, void *c_struct); int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout); void qmi_txn_cancel(struct qmi_txn *txn); void qmi_set_sndtimeo(struct qmi_handle *qmi, long timeo); #endif Loading
drivers/soc/qcom/qmi_interface.c +17 −0 Original line number Diff line number Diff line Loading @@ -454,6 +454,7 @@ static void qmi_handle_net_reset(struct qmi_handle *qmi) struct sockaddr_qrtr sq; struct qmi_service *svc; struct socket *sock; long timeo = qmi->sock->sk->sk_sndtimeo; sock = qmi_sock_create(qmi, &sq); if (IS_ERR(sock)) Loading @@ -473,6 +474,7 @@ static void qmi_handle_net_reset(struct qmi_handle *qmi) sock_release(qmi->sock); qmi->sock = sock; qmi->sq = sq; qmi->sock->sk->sk_sndtimeo = timeo; mutex_unlock(&qmi->sock_lock); list_for_each_entry(svc, &qmi->lookups, list_node) Loading Loading @@ -623,6 +625,21 @@ static struct socket *qmi_sock_create(struct qmi_handle *qmi, return sock; } /** * qmi_set_sndtimeo() - set the sk_sndtimeo of the qmi handle * @qmi: QMI client handle * @timeo: timeout in jiffies. * * This sets the timeout for the blocking socket send in qmi send. */ void qmi_set_sndtimeo(struct qmi_handle *qmi, long timeo) { mutex_lock(&qmi->sock_lock); qmi->sock->sk->sk_sndtimeo = timeo; mutex_unlock(&qmi->sock_lock); } EXPORT_SYMBOL(qmi_set_sndtimeo); /** * qmi_handle_init() - initialize a QMI client handle * @qmi: QMI handle to initialize Loading
drivers/soc/qcom/sysmon-qmi.c +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019, 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 Loading Loading @@ -655,6 +655,7 @@ int sysmon_notifier_register(struct subsys_desc *desc) kfree(data); return rc; } qmi_set_sndtimeo(&data->clnt_handle, HZ); qmi_add_lookup(&data->clnt_handle, SSCTL_SERVICE_ID, SSCTL_VER_2, data->instance_id); Loading
include/linux/soc/qcom/qmi.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2017, Linaro Ltd. * * This program is free software; you can redistribute it and/or modify Loading Loading @@ -275,5 +275,6 @@ int qmi_txn_init(struct qmi_handle *qmi, struct qmi_txn *txn, struct qmi_elem_info *ei, void *c_struct); int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout); void qmi_txn_cancel(struct qmi_txn *txn); void qmi_set_sndtimeo(struct qmi_handle *qmi, long timeo); #endif