usb: pd: policy_engine: Handle Get_Source_Cap properly from PE_SRC_Ready
Get_Source_Cap message is responded by sending source capability message without running sender response timer after GoodCRC is received. As a result if sender response is timed out driver is not issuing hard reset. Fix the issue by moving policy engine state from PE_SRC_READY to PE_SRC_SEND_CAPABILITIES which starts sender response timer and handles timeout. Change-Id: Id47a4c8f989db19d28ef9c8b2c069d0b7797e17f Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
25865f691b
commit
f26a5ca364
1 changed files with 2 additions and 8 deletions
|
@ -1725,14 +1725,8 @@ static void usbpd_sm(struct work_struct *w)
|
|||
|
||||
case PE_SRC_READY:
|
||||
if (IS_CTRL(rx_msg, MSG_GET_SOURCE_CAP)) {
|
||||
ret = pd_send_msg(pd, MSG_SOURCE_CAPABILITIES,
|
||||
default_src_caps,
|
||||
ARRAY_SIZE(default_src_caps), SOP_MSG);
|
||||
if (ret) {
|
||||
usbpd_err(&pd->dev, "Error sending SRC CAPs\n");
|
||||
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
|
||||
break;
|
||||
}
|
||||
pd->current_state = PE_SRC_SEND_CAPABILITIES;
|
||||
kick_sm(pd, 0);
|
||||
} else if (IS_CTRL(rx_msg, MSG_GET_SINK_CAP)) {
|
||||
ret = pd_send_msg(pd, MSG_SINK_CAPABILITIES,
|
||||
pd->sink_caps, pd->num_sink_caps,
|
||||
|
|
Loading…
Add table
Reference in a new issue