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

Commit 83f269ef authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "rpmsg: glink: Add error message in case of callback failure"

parents 97bdcfd4 23351b0e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1049,11 +1049,17 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail)
	if (!left_size) {
		spin_lock(&channel->recv_lock);
		if (channel->ept.cb) {
			channel->ept.cb(channel->ept.rpdev,
			ret = channel->ept.cb(channel->ept.rpdev,
					intent->data,
					intent->offset,
					channel->ept.priv,
					RPMSG_ADDR_ANY);
			if (ret < 0)
				CH_INFO(channel,
					"glink:callback error ret = %d\n", ret);
		} else {
			CH_INFO(channel, "callback not present\n");
			dev_err(glink->dev, "glink:callback not present\n");
		}
		spin_unlock(&channel->recv_lock);

@@ -1396,13 +1402,14 @@ static struct rpmsg_endpoint *qcom_glink_create_ept(struct rpmsg_device *rpdev,
		if (ret)
			return NULL;
	}
	CH_INFO(channel, "Initializing ept\n");

	ept = &channel->ept;
	ept->rpdev = rpdev;
	ept->cb = cb;
	ept->priv = priv;
	ept->ops = &glink_endpoint_ops;

	CH_INFO(channel, "Initialized ept\n");
	return ept;
}

@@ -1422,6 +1429,7 @@ static int qcom_glink_announce_create(struct rpmsg_device *rpdev)
	int iid;
	int size;

	CH_INFO(channel, "Entered\n");
	if (glink->intentless || !completion_done(&channel->open_ack))
		return 0;

@@ -1458,6 +1466,7 @@ static int qcom_glink_announce_create(struct rpmsg_device *rpdev)
			qcom_glink_advertise_intent(glink, channel, intent);
		}
	}
	CH_INFO(channel, "Exit\n");
	return 0;
}

+6 −2
Original line number Diff line number Diff line
@@ -23,8 +23,10 @@ static int qcom_smd_qrtr_callback(struct rpmsg_device *rpdev,
	struct qrtr_smd_dev *qdev = dev_get_drvdata(&rpdev->dev);
	int rc;

	if (!qdev)
	if (!qdev) {
		pr_err("%d:Not ready\n", __func__);
		return -EAGAIN;
	}

	rc = qrtr_endpoint_post(&qdev->ep, data, len);
	if (rc == -EINVAL) {
@@ -62,6 +64,7 @@ static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)
	u32 net_id;
	bool rt;
	int rc;
	pr_err("%d:Entered\n", __func__);

	qdev = devm_kzalloc(&rpdev->dev, sizeof(*qdev), GFP_KERNEL);
	if (!qdev)
@@ -83,7 +86,8 @@ static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)

	dev_set_drvdata(&rpdev->dev, qdev);

	dev_dbg(&rpdev->dev, "Qualcomm SMD QRTR driver probed\n");
	pr_err("%d:SMD QRTR driver probed\n", __func__);
	dev_dbg(&rpdev->dev, "SMD QRTR driver probed\n");

	return 0;
}