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

Skip to content
Commit 0a214ab5 authored by Panicker Harish's avatar Panicker Harish
Browse files

serial: msm_geni_serial: Handle vote_clock_off when rx data is inflight



During vote_clock_off when wait_for_transfers_inflight
returned error indicating rx data is still to be read,
it went ahead, called powered off and set check_wakeup_byte
to true. Since check_wakeup_byte is true, pending rx data
is dropped in search of wakeup byte by msm_geni_find_wakeup_byte.

In meanwhile due to vote_clock_on check_wakeup_byte is
set to false, and some valid data is lost. Since wakeup
byte is not present in pending rx data, check_wakeup_byte
returned -EINVAL, due to which offset of rx_buf was
interpreted wrongly, resulting in crash when pushing
data to upper layer.

Return error in vote_clock_off if still data is inflight,
drop the complete rx buffer if msm_geni_find_wakeup_byte
returns error.

Change-Id: I938a12c343e377521a2fafa2ef353f705c533758
Signed-off-by: default avatarVisweswara Tanuku <quic_vtanuku@quicinc.com>
Signed-off-by: default avatarPanicker Harish <quic_pharish@quicinc.com>
parent 43c2299d
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