Re: [PATCH 1/1] usb: chipidea: udc: bypass pullup DP when gadget connect in OTG fsm mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 23, 2015 at 04:03:35PM +0800, Li Jun wrote:
> By pass pullup DP in OTG fsm mode when do gadget connect, to let it handled
> by OTG state machine.
> 
> Signed-off-by: Li Jun <jun.li@xxxxxxxxxxxxx>
> 
> This patch can fix the problem you found with my HNP polling patchset after
> below 3 patches introduced:
> 467a78c usb: chipidea: udc: apply new usb_udc_vbus_handler interface
> 628ef0d usb: udc: add usb_udc_vbus_handler
> dfea9c9 usb: udc: store usb_udc pointer in struct usb_gadget
> 
> Problem:
> - Connect USB cable and MicroAB cable between two boards
> - Boot up two boards
> - load g_mass_storage at B-device side, the enumeration will success,
> and A will see a usb mass-storage device
> - load g_mass_storage at A-device side, the problem has occurred, the
> connection will be lost at the beginning, then connect again.
> 
> This patch is based on
> commit eff933c1d3a2e046492b3dfc86db813856553a29
> (chipidea: pci: make it depends on NOP_USB_XCEIV)
> on branch peter-usb-dev of
> git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
>  
> ---
>  drivers/usb/chipidea/udc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 8ed497e..e1c1d99 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1575,6 +1575,10 @@ 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))
> +		return 0;
> +
>  	pm_runtime_get_sync(&ci->gadget.dev);
>  	if (is_on)
>  		hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);
> -- 
> 1.9.1
> 

Applied it, thanks.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux