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

Skip to content
Commit d64c7bb0 authored by Girish Mahadevan's avatar Girish Mahadevan
Browse files

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: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent e94b446e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment