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

Commit 684c1655 authored by Prudhvi Yarlagadda's avatar Prudhvi Yarlagadda Committed by Sarannya S
Browse files

rpmsg: qcom_smd: Read data of size equal to fifo size



Add support to read data of size equal to the fifo size.

Change-Id: Iaa235df15f2b19d60b6e167532acbb5aa437e223
Signed-off-by: default avatarPrudhvi Yarlagadda <pyarlaga@codeaurora.org>
parent f95d22e5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ static size_t qcom_smd_channel_ext_read(struct qcom_smd_channel *channel)
		ptr = channel->ext_buf;
	}

	if (channel->pkt_size > channel->fifo_size) {
	if (channel->pkt_size >= channel->fifo_size) {
		avail = qcom_smd_channel_get_rx_avail(channel);
		len = qcom_smd_channel_peek(channel, ptr, avail);
	} else {
@@ -644,8 +644,8 @@ static int qcom_smd_channel_recv_single(struct qcom_smd_channel *channel)

	tail = GET_RX_CHANNEL_INFO(channel, tail);

	/* use extended buffer if data size is greter than fifo size */
	if ((channel->pkt_size > channel->fifo_size) ||
	/* extended buffer if data size is greter than or equal to fifo size */
	if ((channel->pkt_size >= channel->fifo_size) ||
					channel->ext_pkt_size) {
		len = qcom_smd_channel_ext_read(channel);
		if (len == 0)
@@ -736,7 +736,7 @@ static bool qcom_smd_channel_intr(struct qcom_smd_channel *channel)
			"%s: pkt_size: %d ch %s ed %s\n", __func__,
			channel->pkt_size, channel->name, channel->edge->name);
		} else if (channel->pkt_size && (avail >= channel->pkt_size ||
				channel->pkt_size > channel->fifo_size)) {
				channel->pkt_size >= channel->fifo_size)) {
			ret = qcom_smd_channel_recv_single(channel);
			if (ret) {
				smd_ipc(channel->edge->ipc, false, NULL,