From: Felipe Balbi <balbi@kernel.org>
To: Baolin Wang <baolin.wang@linaro.org>, gregkh@linuxfoundation.org
Cc: broonie@kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, baolin.wang@linaro.org
Subject: Re: [PATCH] usb: dwc3: gadget: Add the suspend state checking when stopping gadget
Date: Mon, 20 Jun 2016 11:15:11 +0300 [thread overview]
Message-ID: <87a8igxomo.fsf@linux.intel.com> (raw)
In-Reply-To: <df1cefd4057910a71c724ef2d5b4021bb48ebae6.1466159742.git.baolin.wang@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
Baolin Wang <baolin.wang@linaro.org> writes:
> It will be crash to stop gadget when the dwc3 device had been into suspend
> state, thus we need to check if the dwc3 device had been into suspend state
> when UDC try to stop gadget.
>
> By the way I have rebased on your 'testing/next' branch.
do you really want this note to be in commit log? Seems like this should
be after tearline below.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
> drivers/usb/dwc3/gadget.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 6dde376..351769e 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -1791,6 +1791,9 @@ err0:
>
> static void __dwc3_gadget_stop(struct dwc3 *dwc)
> {
> + if (pm_runtime_suspended(dwc->dev))
> + return;
> +
> dwc3_gadget_disable_irq(dwc);
> __dwc3_gadget_ep_disable(dwc->eps[0]);
> __dwc3_gadget_ep_disable(dwc->eps[1]);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-06-20 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 10:37 Baolin Wang
2016-06-20 8:15 ` Felipe Balbi [this message]
2016-06-20 8:17 ` Baolin Wang
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=87a8igxomo.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--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®