MLK-9618-5 usb: chipidea: otg: show message device no response for SRP fail
authorLi Jun <jun.li@freescale.com>
Mon, 4 May 2015 02:54:20 +0000 (10:54 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:14 +0000 (14:47 -0500)
If b device does not detect vbus on after TB_SRP_FAIL of data pulse,
b device should show 'Device no response' message.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 079e1cb81b6259cb4a5e651e1c02f4c3b58a20ed)

drivers/usb/chipidea/otg_fsm.c
drivers/usb/common/usb-otg-fsm.c

index 78f8f34..92acee7 100644 (file)
@@ -345,6 +345,7 @@ static int b_se0_srp_tmout(struct ci_hdrc *ci)
 static int b_srp_fail_tmout(struct ci_hdrc *ci)
 {
        ci->fsm.b_srp_done = 1;
+       dev_warn(ci->dev, "Device No Response\n");
        return 1;
 }
 
index 7db965f..fe7c1ac 100644 (file)
@@ -68,6 +68,7 @@ static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
        switch (old_state) {
        case OTG_STATE_B_IDLE:
                otg_del_timer(fsm, B_SE0_SRP);
+               otg_del_timer(fsm, B_SRP_FAIL);
                fsm->b_se0_srp = 0;
                fsm->adp_sns = 0;
                fsm->adp_prb = 0;