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:
Rohith Kollalsi <quic_rkollals@quicinc.com>
Loading
Please register or sign in to comment