While system resume, the connected udev as B-device may not has been resumed,
if HNP polling request is sent to it, HNP polling may fail, this patch adds
check of the udev state to make sure it finished resume and to be configured
state before sending host request message, otherwise try next HNP polling
request.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
2cff5eb7bd4feb70cd28ac4655e7433e57a17938)
(cherry picked from commit
b6eea060a3760bdb24d1514a5130a346daba81c9)
return;
}
+ if (udev->state != USB_STATE_CONFIGURED) {
+ dev_dbg(&udev->dev, "the B dev is not resumed!\n");
+ schedule_delayed_work(&fsm->hnp_polling_work,
+ msecs_to_jiffies(T_HOST_REQ_POLL));
+ return;
+ }
+
/*
* Legacy otg test device does not support HNP polling,
* start HNP directly for legacy otg test device.