rpmsg: smd: Don't hold the tx lock during wait
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 12 Dec 2017 23:58:57 +0000 (15:58 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 19 Dec 2017 05:50:11 +0000 (21:50 -0800)
commit178f3f75bb4ef7a29bf5c175eb33794ac9ae9bce
tree94be99cacee7751b464d0046331904558e61be4d
parentb2c932e7991ca7e3995457463b72fc34e64477a0
rpmsg: smd: Don't hold the tx lock during wait

Holding the tx lock while waiting for tx-drain events from the remote
side blocks try_send requests from failing quickly, so temporarily drop
the tx lock while waiting.

While this allows try_send to fail quickly it also could allow a
subsequent send to succeed putting a smaller packet in the FIFO while
we're waiting for room for our large packet. But as this lock is per
channel we expect that clients with ordering concerns implements their
own ordering mechanism.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/qcom_smd.c