Skip to content

Commit

Permalink
Merge "rpmsg: qcom_smd: Read data of size equal to fifo size"
Browse files Browse the repository at this point in the history
  • Loading branch information
qctecmdr authored and Gerrit - the friendly Code Review server committed Sep 4, 2020
2 parents ddf1437 + 9aa1469 commit 7060da6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/rpmsg/qcom_smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,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 {
Expand Down Expand Up @@ -630,8 +630,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)
Expand Down Expand Up @@ -720,7 +720,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,
Expand Down

0 comments on commit 7060da6

Please sign in to comment.