linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Marek Vasut <marex@denx.de>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: Amelie Delaunay <amelie.delaunay@st.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH] [RFC] usb: dwc2: Run the core connect in dwc2_hcd_init()
Date: Wed, 27 May 2020 06:17:27 +0000	[thread overview]
Message-ID: <b9023085-0abb-b994-bb1c-e0b03e99e7ed@synopsys.com> (raw)
In-Reply-To: <4bfffaf9-fffd-57bc-6d45-ba43c46cd136@synopsys.com>

Hi Marek,

On 5/15/2020 11:41 AM, Minas Harutyunyan wrote:
> Hi Marek,

Any update on on this patch testing?

Thanks,
Minas

>>
> Could you please test with this patch.
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 12b98b466287..7faf5f8c056d 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -4920,12 +4920,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
>    					  epnum, 0);
>    	}
> 
> -	ret = usb_add_gadget_udc(dev, &hsotg->gadget);
> -	if (ret) {
> -		dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep,
> -					   hsotg->ctrl_req);
> -		return ret;
> -	}
>    	dwc2_hsotg_dump(hsotg);
> 
>    	return 0;
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 8ea4a24637fa..603b85cd8ed3 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -537,6 +537,16 @@ static int dwc2_driver_probe(struct platform_device
> *dev)
>    	if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)
>    		dwc2_lowlevel_hw_disable(hsotg);
> 
> +	/* Postponed adding a new gadget to the udc class driver list */
> +	if (hsotg->gadget_enabled) {
> +		retval = usb_add_gadget_udc(hsotg->dev, &hsotg->gadget);
> +		if (retval) {
> +			dwc2_hsotg_remove(hsotg);
> +			goto error_init;
> +		}
> +
> +	}
> +
>    	return 0;
> 
>    error_init:
> 
> 
> 
> Thanks,
> Minas
> 

  reply	other threads:[~2020-05-27  6:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 14:31 [PATCH] [RFC] usb: dwc2: Run the core connect in dwc2_hcd_init() Marek Vasut
2020-04-13 14:45 ` Minas Harutyunyan
2020-04-13 14:54   ` Marek Vasut
2020-04-13 15:27     ` Minas Harutyunyan
2020-04-13 17:00       ` Marek Vasut
2020-04-14  7:14         ` Minas Harutyunyan
2020-04-14 12:18           ` Marek Vasut
2020-04-15  8:37             ` Minas Harutyunyan
2020-04-15 14:55               ` Marek Vasut
2020-04-15 15:10                 ` Minas Harutyunyan
2020-04-16  9:46                   ` Marek Vasut
2020-04-16 13:37                     ` Minas Harutyunyan
2020-04-16 14:31                       ` Marek Vasut
2020-04-17  9:00                         ` Minas Harutyunyan
2020-04-20 12:09                           ` Marek Vasut
2020-04-22 13:45                             ` Minas Harutyunyan
2020-04-22 14:21                               ` Marek Vasut
2020-05-14  0:10                                 ` Marek Vasut
2020-05-15  7:41                                   ` Minas Harutyunyan
2020-05-27  6:17                                     ` Minas Harutyunyan [this message]
2020-05-28 22:35                                       ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9023085-0abb-b994-bb1c-e0b03e99e7ed@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=amelie.delaunay@st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=marex@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).