USB: serial: ch341: fix resume after reset
authorJohan Hovold <johan@kernel.org>
Fri, 6 Jan 2017 18:15:14 +0000 (19:15 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:41 +0000 (02:18 +0000)
commitf7eabb93502747b10866c31ed0475d53bf860832
treea369ba16bc5e9a8daa3214861d4b4f2283d66230
parente43af30720dd7294a1370a16ed58146381a42d7d
USB: serial: ch341: fix resume after reset

commit ce5e292828117d1b71cbd3edf9e9137cf31acd30 upstream.

Fix reset-resume handling which failed to resubmit the read and
interrupt URBs, thereby leaving a port that was open before suspend in a
broken state until closed and reopened.

Fixes: 1ded7ea47b88 ("USB: ch341 serial: fix port number changed after
resume")
Fixes: 2bfd1c96a9fb ("USB: serial: ch341: remove reset_resume callback")
Signed-off-by: Johan Hovold <johan@kernel.org>
[bwh: Backported to 3.2:
 - Move initialisation of 'serial' up to make this work
 - Delete the call to usb_serial_resume() that was still present and
   would be redundant with usb_serial_generic_resume()
 - Open-code tty_port_initialized()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/ch341.c