public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: fsl_udc_core: Fix pullup status
@ 2016-03-24 23:14 Dmitry Osipenko
  2016-03-25 11:12 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Osipenko @ 2016-03-24 23:14 UTC (permalink / raw)
  To: Felipe Balbi, Li Yang; +Cc: linux-usb, linux-kernel, Suresh Gupta

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);
+
 	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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-25 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 23:14 [PATCH] usb: gadget: fsl_udc_core: Fix pullup status Dmitry Osipenko
2016-03-25 11:12 ` Sergei Shtylyov
2016-03-25 13:03   ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox