mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
Merge "rpmsg: glink: Add error message in case of callback failure"
This commit is contained in:
commit
550a843c8f
2 changed files with 17 additions and 4 deletions
|
|
@ -1006,11 +1006,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);
|
||||
|
||||
|
|
@ -1373,13 +1379,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;
|
||||
}
|
||||
|
||||
|
|
@ -1399,6 +1406,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;
|
||||
|
||||
|
|
@ -1435,6 +1443,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,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) {
|
||||
|
|
@ -63,6 +65,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)
|
||||
|
|
@ -84,7 +87,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue