From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Dmitry Osipenko <digetx@gmail.com>,
Felipe Balbi <balbi@kernel.org>, Li Yang <leoli@freescale.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Suresh Gupta <suresh.gupta@freescale.com>
Subject: Re: [PATCH] usb: gadget: fsl_udc_core: Fix pullup status
Date: Fri, 25 Mar 2016 14:12:29 +0300 [thread overview]
Message-ID: <56F51D1D.8020804@cogentembedded.com> (raw)
In-Reply-To: <1458861242-3906-1-git-send-email-digetx@gmail.com>
Hello.
On 3/25/2016 2:14 AM, Dmitry Osipenko wrote:
> udc->softconnect should be set regardless of the VBUS state, otherwise
> the USB peripheral device, connected during suspend, won't be detected
> since can_pullup() would return false the UDC controller won't be enabled.
>
> Fixes: 252455c40316 (usb: gadget: fsl driver pullup fix)
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
> drivers/usb/gadget/udc/fsl_udc_core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
> index aab5221..118cf7a 100644
> --- a/drivers/usb/gadget/udc/fsl_udc_core.c
> +++ b/drivers/usb/gadget/udc/fsl_udc_core.c
> @@ -1220,10 +1220,11 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)
>
> udc = container_of(gadget, struct fsl_udc, gadget);
>
> + udc->softconnect = (is_on != 0);
!!is_on? Parens not needed anyway though.
> +
> if (!udc->vbus_active)
> return -EOPNOTSUPP;
>
> - udc->softconnect = (is_on != 0);
> if (can_pullup(udc))
> fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP),
> &dr_regs->usbcmd);
MBR, Sergei
next prev parent reply other threads:[~2016-03-25 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 23:14 [PATCH] usb: gadget: fsl_udc_core: Fix pullup status Dmitry Osipenko
2016-03-25 11:12 ` Sergei Shtylyov [this message]
2016-03-25 13:03 ` Dmitry Osipenko
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=56F51D1D.8020804@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@kernel.org \
--cc=digetx@gmail.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=suresh.gupta@freescale.com \
/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