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:Visweswara Tanuku <quic_vtanuku@quicinc.com> Signed-off-by:
Panicker Harish <quic_pharish@quicinc.com>
Loading
Please register or sign in to comment