1
0
Fork 0

MLK-9897-2 usb: otg-fsm: check B-device state before sending polling request

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)
pull/10/head
Li Jun 2014-11-25 12:08:48 +08:00 committed by Jason Liu
parent 52875135a4
commit a4dd6e88d3
1 changed files with 7 additions and 0 deletions

View File

@ -157,6 +157,13 @@ static void otg_hnp_polling_work(struct work_struct *work)
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.