This patch fixes the following OTG related bugs:
1. The current code does not wait for the ongoing HNP polling work to
finish upon the device disconnection which results in a crash when
accessing the udev structure in hnp polling routine.
2. bcdOTG field is added to OTG descriptor in 2.0 revision. Check OTG
descriptor size before validating bcdOTG field. A legacy device sends
2 bytes lesser than the size of OTG descriptor specified in 2.0 spec.
3. The host is required to execute a GetStatus() with a frequency of
THOST_REQ_POLL in order to determine the state of the Host request flag.
The limits of THOST_REQ_POLL are 1 - 2 sec. Use the average value 1.5 sec
for HNP polling to pass compliance tests.
Change-Id: Ie6a6a8e915d10c1347946f979c919d04d64823b4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>