Fix one bug that host can't work after insmod gadget module

at dual-role mode, the root cause of this issue is the usbcmd.rs
 is cleared by chipidea udc code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJXtmlkAAoJEEhZKYFQ1nG7NNYIAJkZkiDvmdJWj9Bd0m742ftB
 nroxMUAD02CJNRj1vH2h/9ahTjsTsXDyO8sFbWxgmBxpg7JKwuOFNXZQaFUHqZXh
 aLjNW8199iX5bRiAncEgeJvZGDRoOo7mHrCtNGBYCvDXWqISI5CiyHzT7svzEHus
 7AleXuWp/SnexOT/LS9xSZ//ooCtMCMBR+2Ns+QYQrHVtI6CwZ6umC8jiK9Xec7L
 FSyPfpZk9sQtcMN27Cgk8D7YFx/Z13SHgfF139LZNNwUQYsjkfjD7Ru6okkmxFS2
 bvy7LJlYaGVKoezjB6VktNL/fZ8DoggC2gFTe6kbmHhev/u1YDM+JBU21Jo4MzA=
 =VOuU
 -----END PGP SIGNATURE-----

Merge tag 'usb-ci-v4.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus

Peter writes:

Fix one bug that host can't work after insmod gadget module
at dual-role mode, the root cause of this issue is the usbcmd.rs
is cleared by chipidea udc code.
This commit is contained in:
Greg Kroah-Hartman 2016-08-30 14:07:01 +02:00
commit 83b4a3d79e

View file

@ -1596,8 +1596,11 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
{
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
/* Data+ pullup controlled by OTG state machine in OTG fsm mode */
if (ci_otg_is_fsm_mode(ci))
/*
* Data+ pullup controlled by OTG state machine in OTG fsm mode;
* and don't touch Data+ in host mode for dual role config.
*/
if (ci_otg_is_fsm_mode(ci) || ci->role == CI_ROLE_HOST)
return 0;
pm_runtime_get_sync(&ci->gadget.dev);