linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: u_serial: clear suspended flag when discnnecting
@ 2020-08-21  8:56 Yoshihiro Shimoda
  2020-09-09  0:00 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 2+ messages in thread
From: Yoshihiro Shimoda @ 2020-08-21  8:56 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-renesas-soc, Yoshihiro Shimoda

The commit aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume
callbacks") set/cleared the suspended flag in USB bus suspend/resume
only. But, when a USB cable is disconnected in the suspend, since some
controllers will not detect USB bus resume, the suspended flag is not
cleared. After that, user cannot send any data. To fix the issue,
clears the suspended flag in the gserial_disconnect().

Fixes: aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Linh Phung <linh.phung.jy@renesas.com>
Tested-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
---
 drivers/usb/gadget/function/u_serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 127ecc2..2caccbb 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1391,6 +1391,7 @@ void gserial_disconnect(struct gserial *gser)
 		if (port->port.tty)
 			tty_hangup(port->port.tty);
 	}
+	port->suspended = false;
 	spin_unlock_irqrestore(&port->port_lock, flags);
 
 	/* disable endpoints, aborting down any active I/O */
-- 
2.7.4


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

* RE: [PATCH] usb: gadget: u_serial: clear suspended flag when discnnecting
  2020-08-21  8:56 [PATCH] usb: gadget: u_serial: clear suspended flag when discnnecting Yoshihiro Shimoda
@ 2020-09-09  0:00 ` Yoshihiro Shimoda
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshihiro Shimoda @ 2020-09-09  0:00 UTC (permalink / raw)
  To: Yoshihiro Shimoda, balbi; +Cc: gregkh, linux-usb, linux-renesas-soc

Hi,

> From: Yoshihiro Shimoda, Sent: Friday, August 21, 2020 5:56 PM
> Subject: [PATCH] usb: gadget: u_serial: clear suspended flag when discnnecting

I realized the subject had typo. So, I'll resubmit v2 patch soon.

Best regards,
Yoshihiro Shimoda


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

end of thread, other threads:[~2020-09-09  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21  8:56 [PATCH] usb: gadget: u_serial: clear suspended flag when discnnecting Yoshihiro Shimoda
2020-09-09  0:00 ` Yoshihiro Shimoda

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).