msm: mhi_dev: Avoiding delay in transfer completion
When size of user client buffer is smaller than the size of data read,
client calls the mhi_uci_client_read API for the second time with the
remaining bytes of data to be copied. In this, data is already read
from host but copying to client buffer is pending. With the current
logic device waits for read_wq and then eventually exits as there is
no data to read from host. This is causing a delay in the transfer
completion in the case where user client buffer is less than data read
from host.
To avoid this delay, entering the loop to read data from host only if
it is a new transfer. For old transfers, as read from host is already
done, waiting for read_wq is avoided with this change.
Change-Id: I75b6f6e3673cf5c05693579acaddf189b5478926
Signed-off-by:
Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
Loading
Please register or sign in to comment