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

Commit 0f8fbfe6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "slim_msm: Gracefully handle QMI timeout failures"

parents 730e0422 2b813944
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ static int ngd_xfer_msg(struct slim_controller *ctrl, struct slim_msg_txn *txn)
		 * It also makes HW status cosistent with what SW has it here
		 */
		if ((pm_runtime_enabled(dev->dev) && ret < 0) ||
				dev->state == MSM_CTRL_DOWN) {
				dev->state >= MSM_CTRL_ASLEEP) {
			SLIM_ERR(dev, "slim ctrl vote failed ret:%d, state:%d",
					ret, dev->state);
			pm_runtime_set_suspended(dev->dev);
@@ -716,7 +716,7 @@ static int ngd_bulk_wr(struct slim_controller *ctrl, u8 la, u8 mt, u8 mc,
	mutex_lock(&dev->tx_lock);

	if ((pm_runtime_enabled(dev->dev) && ret < 0) ||
			dev->state == MSM_CTRL_DOWN) {
			dev->state >= MSM_CTRL_ASLEEP) {
		SLIM_WARN(dev, "vote failed/SSR in-progress ret:%d, state:%d",
				ret, dev->state);
		pm_runtime_set_suspended(dev->dev);
+6 −3
Original line number Diff line number Diff line
@@ -1404,9 +1404,12 @@ static void msm_slim_qmi_recv_msg(struct kthread_work *work)
	struct msm_slim_qmi *qmi =
			container_of(work, struct msm_slim_qmi, kwork);

	/* Drain all packets received */
	do {
		rc = qmi_recv_msg(qmi->handle);
	if (rc < 0)
		pr_err("%s: Error receiving QMI message\n", __func__);
	} while (rc == 0);
	if (rc != -ENOMSG)
		pr_err("%s: Error receiving QMI message:%d\n", __func__, rc);
}

static void msm_slim_qmi_notify(struct qmi_handle *handle,
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@
#define SLIMBUS_QMI_INS_ID 0

/* QMI response timeout of 500ms */
#define SLIM_QMI_RESP_TOUT 500
#define SLIM_QMI_RESP_TOUT 1000

#define PGD_THIS_EE(r, v) ((v) ? PGD_THIS_EE_V2(r) : PGD_THIS_EE_V1(r))
#define PGD_PORT(r, p, v) ((v) ? PGD_PORT_V2(r, p) : PGD_PORT_V1(r, p))