Skip to contentSkip to conversation

FAILED: patch "[PATCH] rpmsg: glink: smem: Support rx peak for size less than 4" failed to apply to 4.19-stable tree

PATCH [email protected] 1 participant 1 message Nov 12, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 928002a5e9dab2ddc1a0fe3e00739e89be30dc6b Mon Sep 17 00:00:00 2001

From: Arun Kumar Neelakantam <[email protected]>
Date: Wed, 3 Oct 2018 17:08:20 +0530
Subject: [PATCH] rpmsg: glink: smem: Support rx peak for size less than 4
bytes

The current rx peak function fails to read the data if size is less than 4bytes.

Use memcpy_fromio to support data reads of size less than 4 bytes.

Fixes f0beb4ba9b18 ("rpmsg: glink: Remove chunk size word align warning")
drivers/rpmsg/qcom_glink_smem.c +4 -8
index ab23da3d7131..64a5ce324c7f 100644
@@ -89,15 +89,11 @@ static void glink_smem_rx_peak(struct qcom_glink_pipe *np,
 		tail -= pipe->native.length;
 
 	len = min_t(size_t, count, pipe->native.length - tail);
-	if (len) {
-		__ioread32_copy(data, pipe->fifo + tail,
-				len / sizeof(u32));
-	}
+	if (len)
+		memcpy_fromio(data, pipe->fifo + tail, len);
 
-	if (len != count) {
-		__ioread32_copy(data + len, pipe->fifo,
-				(count - len) / sizeof(u32));
-	}
+	if (len != count)
+		memcpy_fromio(data + len, pipe->fifo, (count - len));
 }
 
 static void glink_smem_rx_advance(struct qcom_glink_pipe *np,