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

Skip to content
Commit 7e6c1dfa authored by Rohith Kollalsi's avatar Rohith Kollalsi
Browse files

usb: pd: Process request message as soon as it is received



Below mentioned is the sequence of operations done during a pr swap.
During the issue scenario, the sleep time of 26 ms is almost coinciding
between src_send_capabilities and snk_select_capabilities. Due to this
sink side is not able to receive accept from the source for the message
request sent. Hence, it does a hard reset.

State changes during working scenario.

Source					Sink

SRC_Startup				SNK_Startup

SRC_Send_Capabilities
sleeps for 26ms then entertains req
from snk
					SNK_Evaluate_Capability
					SNK_Select_Capability
					send message request to src
					expects accept in 26ms or else
					does hard reset
Message request received from snk
SRC_Negotiate_Capability
Send message accept
					SNK_Transition_Sink
SRC_Ready
					SNK_READY

Below is the issue scenario

Source					Sink

SRC_Startup				SNK_Startup

SRC_Send_Capabilities
sleeps for 26ms then entertains req
from snk
					SNK_Evaluate_Capability
					SNK_Select_Capability
					send message request to src
					expects accept in 26ms or else
					does hard reset
Message request received from snk
during this 26ms sleep, hence it
couldn't send accept
					Perform hard reset as accept
					not received within 26ms

Fix this by processing the request message immediately after it is
received. This makes sure that request message sent from another end
is processed quickly, so that it doesn't cause other end to send
a hard reset.

Change-Id: I7ffc0772df9300f6e56bbb4e4ad9aa3f15b10b8a
Signed-off-by: default avatarRohith Kollalsi <quic_rkollals@quicinc.com>
parent e904060a
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