kernel-hacking-2024-linux-s.../drivers/usb/serial
Dmitry Smirnov c15a688e49 USB: serial: mos7840: fix crash on resume
Since commit c49cfa9170 ("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: d83b405383 ("USB: serial: add support for multiple read urbs")
Cc: stable@vger.kernel.org	# 3.3
Signed-off-by: Johan Hovold <johan@kernel.org>
2024-07-09 18:10:04 +02:00
..
aircable.c
ark3116.c
belkin_sa.c
belkin_sa.h
bus.c USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
ch341.c
console.c
cp210x.c USB: serial: cp210x: add pid/vid for TDK NC0110013M and MM0110113M 2024-03-05 07:51:37 +01:00
cyberjack.c
cypress_m8.c
cypress_m8.h
digi_acceleport.c
empeg.c
ezusb_convert.pl
f81232.c
f81534.c
ftdi_sio.c USB: serial: ftdi_sio: remove redundant assignment to variable cflag 2024-03-04 14:54:02 +01:00
ftdi_sio.h
ftdi_sio_ids.h USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB 2024-03-04 11:07:47 +01:00
garmin_gps.c
generic.c
io_16654.h
io_edgeport.c
io_edgeport.h
io_ionsp.h
io_ti.c
io_ti.h
io_usbvend.h
ipaq.c
ipw.c
ir-usb.c
iuu_phoenix.c
iuu_phoenix.h
Kconfig
keyspan.c USB: serial: keyspan: remove redundant assignment to pointer data 2024-03-04 14:54:36 +01:00
keyspan_pda.c
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
kl5kusb105.c
kl5kusb105.h
kobil_sct.c
kobil_sct.h
Makefile
Makefile-keyspan_pda_fw
mct_u232.c
mct_u232.h
metro-usb.c
mos7720.c
mos7840.c USB: serial: mos7840: fix crash on resume 2024-07-09 18:10:04 +02:00
mxuport.c
navman.c
omninet.c
opticon.c
option.c USB: serial: option: add Rolling RW350-GL variants 2024-07-05 12:55:24 +02:00
oti6858.c USB: serial: oti6858: remove redundant assignment to variable divisor 2024-03-04 14:37:52 +01:00
oti6858.h
pl2303.c
pl2303.h
qcaux.c
qcserial.c USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e 2024-01-30 16:03:17 +01:00
quatech2.c
safe_serial.c
sierra.c
spcp8x5.c
ssu100.c
symbolserial.c
ti_usb_3410_5052.c
upd78f0730.c
usb-serial-simple.c USB: serial: simple: sort driver entries 2023-07-20 15:59:25 +02:00
usb-serial.c USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
usb-wwan.h
usb_debug.c
usb_wwan.c
visor.c
visor.h
whiteheat.c
whiteheat.h
wishbone-serial.c
xr_serial.c USB: serial: xr: add TIOCGRS485 and TIOCSRS485 ioctls 2023-07-20 15:37:03 +02:00
xsens_mt.c