mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
usb: chipidea: udc: don't touch DP when controller is in host mode
commit c4e9417498 upstream.
When the controller is configured to be dual role and it's in host mode,
if bind udc and gadgt driver, those gadget operations will do gadget
disconnect and finally pull down DP line, which will break host function.
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5ab968f27a
commit
8136b595bf
@@ -1585,8 +1585,11 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
|
|||||||
{
|
{
|
||||||
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
|
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;
|
return 0;
|
||||||
|
|
||||||
pm_runtime_get_sync(&ci->gadget.dev);
|
pm_runtime_get_sync(&ci->gadget.dev);
|
||||||
|
|||||||
Reference in New Issue
Block a user