Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0ab9470 authored by Roger Quadros's avatar Roger Quadros Committed by Mayank Rana
Browse files

usb: xhci: Fix suspend/resume when used with OTG core



In the OTG case, the controller might not yet have been
added or is removed before the system suspends.

Assign xhci->main_hcd during probe to prevent NULL
pointer de-reference in xhci_suspend/resume().

Use the hcd->state flag to check if HCD is halted
and if that is so do nothing for xhci_suspend/resume().

[Only for xhci-plat devices, pci devices need it in gen_setup -Mathias]
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 9fa733f24bb54dd532b5f5d7abc275c4a547c69f
Git-repo: git://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git


[mrana@codeaurora.org: Fix minor merge conflict]
Change-Id: If064778fa56a8e41ebfd80884802b2abced514ca
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 93718650
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment