From: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-stm32@st-md-mailman.stormreply.com"
<linux-stm32@st-md-mailman.stormreply.com>,
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Subject: Re: [PATCH 1/1] usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
Date: Tue, 18 Jan 2022 11:40:46 +0100 [thread overview]
Message-ID: <1f8db483-0965-e87d-20b0-4f2bccd9a3dd@foss.st.com> (raw)
In-Reply-To: <39694435-d44b-64f8-9614-6082f9c22443@synopsys.com>
Hi Greg,
Kind reminder about this patch.
Thanks,
Amelie
On 12/16/21 11:20 AM, Minas Harutyunyan wrote:
> On 12/7/2021 5:01 PM, Amelie Delaunay wrote:
>> Calling dwc2_hsotg_ep_disable on ep0 (in/out) will lead to the following
>> logs before returning -EINVAL:
>> dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0
>> dwc2 49000000.usb-otg: dwc2_hsotg_ep_disable: called for ep0
>>
>> To avoid these two logs while suspending, start disabling the endpoint
>> from the index 1, as done in dwc2_hsotg_udc_stop:
>>
>> /* all endpoints should be shutdown */
>> for (ep = 1; ep < hsotg->num_of_eps; ep++) {
>> if (hsotg->eps_in[ep])
>> dwc2_hsotg_ep_disable_lock(&hsotg->eps_in[ep]->ep);
>> if (hsotg->eps_out[ep])
>> dwc2_hsotg_ep_disable_lock(&hsotg->eps_out[ep]->ep);
>> }
>>
>> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
>
> Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
>
>> ---
>> drivers/usb/dwc2/gadget.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index b884a83b26a6..ee31f9a328da 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -5086,7 +5086,7 @@ int dwc2_hsotg_suspend(struct dwc2_hsotg *hsotg)
>> hsotg->gadget.speed = USB_SPEED_UNKNOWN;
>> spin_unlock_irqrestore(&hsotg->lock, flags);
>>
>> - for (ep = 0; ep < hsotg->num_of_eps; ep++) {
>> + for (ep = 1; ep < hsotg->num_of_eps; ep++) {
>> if (hsotg->eps_in[ep])
>> dwc2_hsotg_ep_disable_lock(&hsotg->eps_in[ep]->ep);
>> if (hsotg->eps_out[ep])
>
next prev parent reply other threads:[~2022-01-18 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 13:01 Amelie Delaunay
2021-12-14 6:22 ` Minas Harutyunyan
2021-12-14 12:53 ` Amelie DELAUNAY
2021-12-16 10:18 ` Minas Harutyunyan
2021-12-16 10:20 ` Minas Harutyunyan
2022-01-18 10:40 ` Amelie DELAUNAY [this message]
2022-01-18 11:01 ` Greg Kroah-Hartman
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=1f8db483-0965-e87d-20b0-4f2bccd9a3dd@foss.st.com \
--to=amelie.delaunay@foss.st.com \
--cc=Minas.Harutyunyan@synopsys.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-usb@vger.kernel.org \
/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
all inboxes | Powered by JetHome®