rpmsg: glink: do not break from interrupt handler

If receive callback fails, returning error can cause interrupt
handler to exit. if old interrupts have been missed glink may
not read new packets from rx fifo.

Print error message if callback fails but do not return any error
to interrupt handler so that it can continue reading pending data in
rx fifo even if old interrupts were missed and no new interrupt is
coming from remote host.

Change-Id: I1adec1e2ba7337008ecc2d71bf5f96c331a22695
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 26844da..492ba74 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -41,12 +41,19 @@
 			       ch->lcid, ch->rcid, __func__, ##__VA_ARGS__); \
 } while (0)
 
-
 #define GLINK_ERR(ctxt, x, ...)						  \
 do {									  \
 	pr_err_ratelimited("[%s]: "x, __func__, ##__VA_ARGS__);		  \
 	if (ctxt)							  \
 		ipc_log_string(ctxt, "[%s]: "x, __func__, ##__VA_ARGS__); \
+
+#define CH_ERR(ch, x, ...)						     \
+do {									     \
+	if (ch->glink) {						     \
+		ipc_log_string(ch->glink->ilc, "%s[%d:%d] %s: "x, ch->name,  \
+			       ch->lcid, ch->rcid, __func__, ##__VA_ARGS__); \
+		dev_err(ch->glink->dev, "[%s]: "x, __func__, ##__VA_ARGS__); \
+	}								     \
 } while (0)
 
 #define GLINK_NAME_SIZE		32
@@ -1054,12 +1061,14 @@
 					intent->offset,
 					channel->ept.priv,
 					RPMSG_ADDR_ANY);
-			if (ret < 0)
-				CH_INFO(channel,
-					"glink:callback error ret = %d\n", ret);
+
+			if (ret < 0) {
+				CH_ERR(channel,
+					"callback error ret = %d\n", ret);
+				ret = 0;
+			}
 		} else {
-			CH_INFO(channel, "callback not present\n");
-			dev_err(glink->dev, "glink:callback not present\n");
+			CH_ERR(channel, "callback not present\n");
 		}
 		spin_unlock(&channel->recv_lock);
 
diff --git a/net/qrtr/smd.c b/net/qrtr/smd.c
index aec36db..4b08f4e 100644
--- a/net/qrtr/smd.c
+++ b/net/qrtr/smd.c
@@ -24,7 +24,7 @@
 	int rc;
 
 	if (!qdev) {
-		pr_err("%d:Not ready\n", __func__);
+		pr_err("%s:Not ready\n", __func__);
 		return -EAGAIN;
 	}
 
@@ -64,7 +64,7 @@
 	u32 net_id;
 	bool rt;
 	int rc;
-	pr_err("%d:Entered\n", __func__);
+	pr_info("%s:Entered\n", __func__);
 
 	qdev = devm_kzalloc(&rpdev->dev, sizeof(*qdev), GFP_KERNEL);
 	if (!qdev)
@@ -86,8 +86,7 @@
 
 	dev_set_drvdata(&rpdev->dev, qdev);
 
-	pr_err("%d:SMD QRTR driver probed\n", __func__);
-	dev_dbg(&rpdev->dev, "SMD QRTR driver probed\n");
+	pr_info("%s:SMD QRTR driver probed\n", __func__);
 
 	return 0;
 }