usb: XHCI: Implement xhci_handshake_check_state() API

This API is called to handle command timeout which may
happen upon XHCI stack removal. Since handshake is performed
by polling long duration for status, this can cause watchdog
timeout if status does not change for entire duration of
polling. Hence add new API which also checks for xhci state
and exit the handshake if xhci is removed.

Change-Id: I9a90b2dd83d76f80e3f6fd4546b949c88850edd3
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2 files changed