kernel_samsung_a53x/drivers/usb/serial
Dmitry Smirnov 7fda15c298 USB: serial: mos7840: fix crash on resume
commit c15a688e49987385baa8804bf65d570e362f8576 upstream.

Since commit c49cfa917025 ("USB: serial: use generic method if no
alternative is provided in usb serial layer"), USB serial core calls the
generic resume implementation when the driver has not provided one.

This can trigger a crash on resume with mos7840 since support for
multiple read URBs was added back in 2011. Specifically, both port read
URBs are now submitted on resume for open ports, but the context pointer
of the second URB is left set to the core rather than mos7840 port
structure.

Fix this by implementing dedicated suspend and resume functions for
mos7840.

Tested with Delock 87414 USB 2.0 to 4x serial adapter.

Signed-off-by: Dmitry Smirnov <d.smirnov@inbox.lv>
[ johan: analyse crash and rewrite commit message; set busy flag on
         resume; drop bulk-in check; drop unnecessary usb_kill_urb() ]
Fixes: d83b405383c9 ("USB: serial: add support for multiple read urbs")
Cc: stable@vger.kernel.org	# 3.3
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 14:19:44 +01:00
..
aircable.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ark3116.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
belkin_sa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
belkin_sa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ch341.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
console.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cp210x.c USB: serial: cp210x: add pid/vid for TDK NC0110013M and MM0110113M 2024-11-19 09:22:17 +01:00
cyberjack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cypress_m8.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cypress_m8.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
digi_acceleport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
empeg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ezusb_convert.pl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f81232.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f81534.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftdi_sio.c USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB 2024-11-19 09:22:17 +01:00
ftdi_sio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftdi_sio_ids.h USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB 2024-11-19 09:22:17 +01:00
garmin_gps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_16654.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_edgeport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_edgeport.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_ionsp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_ti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_ti.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io_usbvend.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipaq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ir-usb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iuu_phoenix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iuu_phoenix.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_pda.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_usa26msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_usa28msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_usa49msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_usa67msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keyspan_usa90msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kl5kusb105.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kl5kusb105.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kobil_sct.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kobil_sct.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile-keyspan_pda_fw Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mct_u232.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mct_u232.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
metro-usb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mos7720.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mos7840.c USB: serial: mos7840: fix crash on resume 2024-11-19 14:19:44 +01:00
mxuport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
navman.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omninet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opticon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
option.c USB: serial: option: add Rolling RW350-GL variants 2024-11-19 14:19:44 +01:00
oti6858.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oti6858.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pl2303.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pl2303.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcaux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcserial.c USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e 2024-11-18 12:13:26 +01:00
quatech2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
safe_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sierra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spcp8x5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ssu100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
symbolserial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti_usb_3410_5052.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
upd78f0730.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb-serial-simple.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb-serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb-wwan.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb_wwan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
visor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
visor.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
whiteheat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
whiteheat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wishbone-serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xsens_mt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00