serial: msm_serial_hs: Add extra delay during close with pending tx
In some cases the userspace can do a back to back write() followed by
close(). In such cases the tty framework does account for this by asking
the driver the status of the tx buffer and if not empty wait for a timeout
computed as a function of the current port baud rate.
However in some cases, this timeout doesn't seem sufficient, so when
checking the state of the tx buffer insert an extra delay if not empty
before returning to the framework. This will do a double wait at driver
and at framework, but this shouldn't adversely affect timing of usecases
and the flip side of having a pending byte in the tx buffer can result
in the peer hardware being left in a bad state.
Change-Id: I372e2e1c68f13f5d537ea33980eb63487f31d589
CRs-Fixed: 1044170
Signed-off-by:
Girish Mahadevan <girishm@codeaurora.org>
Loading
Please register or sign in to comment