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

Commit eca29577 authored by Naveen Kaje's avatar Naveen Kaje Committed by Gerrit - the friendly Code Review server
Browse files

slim-msm: manage TX message queue pointer



In the TX message queue handler, update the TX head such that
it correctly points to the next message to be processed. Fix
the logic such that all the processed IO vectors are handled, even
when the packets arrive out of order.

Change-Id: Iee45c5acb45f9a8eb475667cc4a87d13b62adc7a
Signed-off-by: default avatarNaveen Kaje <nkaje@codeaurora.org>
parent fb120d64
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -474,15 +474,9 @@ void msm_slim_tx_msg_return(struct msm_slim_ctrl *dev, int err)
		}
		/* reclaim all packets that were delivered out of order */
		if (idx != dev->tx_head)
			pr_err("SLIM OUT OF ORDER TX:idx:%d, head:%d", idx,
								dev->tx_head);
		while (idx == dev->tx_head) {
			SLIM_WARN(dev, "SLIM OUT OF ORDER TX:idx:%d, head:%d",
				idx, dev->tx_head);
		dev->tx_head = (dev->tx_head + 1) % MSM_TX_BUFS;
			idx++;
			if (dev->tx_head == dev->tx_tail ||
					dev->wr_comp[idx] != NULL)
				break;
		}
	}
}