usb: gadget: u_serial: clear suspended flag when disconnecting
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 9 Sep 2020 00:01:32 +0000 (09:01 +0900)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:41 +0000 (09:57 +0300)
commitd98ef43bfb65b5201e1afe36aaf8c4f9d71b4307
treee9500d8265192bcb97d40a6327cb0283f3e4a695
parent897b81384302bf2e1eaff008163e492dda4ceaca
usb: gadget: u_serial: clear suspended flag when disconnecting

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>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/u_serial.c