kernel_samsung_a53x/drivers/input/mouse
Jeffery Miller b40ca90b9c Input: psmouse - fix fast_reconnect function for PS/2 mode
commit e2cb5cc822b6c9ee72c56ce1d81671b22c05406a upstream.

When the SMBus connection is attempted psmouse_smbus_init() sets
the fast_reconnect pointer to psmouse_smbus_reconnecti(). If SMBus
initialization fails, elantech_setup_ps2() and synaptics_init_ps2() will
fallback to PS/2 mode, replacing the psmouse private data. This can cause
issues on resume, since psmouse_smbus_reconnect() expects to find an
instance of struct psmouse_smbus_dev in psmouse->private.

The issue was uncovered when in 92e24e0e57f7 ("Input: psmouse - add
delay when deactivating for SMBus mode") psmouse_smbus_reconnect()
started attempting to use more of the data structure. The commit was
since reverted, not because it was at fault, but because there was found
a better way of doing what it was attempting to do.

Fix the problem by resetting the fast_reconnect pointer in psmouse
structure in elantech_setup_ps2() and synaptics_init_ps2() when the PS/2
mode is used.

Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Jeffery Miller <jefferymiller@google.com>
Fixes: bf232e460a35 ("Input: psmouse-smbus - allow to control psmouse_deactivate")
Link: https://lore.kernel.org/r/20231005002249.554877-1-jefferymiller@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:25:50 +01:00
..
alps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
alps.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amimouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
appletouch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atarimouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm5974.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
byd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
byd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyapa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyapa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyapa_gen3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyapa_gen5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyapa_gen6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cypress_ps2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cypress_ps2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elan_i2c.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elan_i2c_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elan_i2c_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elan_i2c_smbus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
elantech.c Input: psmouse - fix fast_reconnect function for PS/2 mode 2024-11-08 11:25:50 +01:00
elantech.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
focaltech.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
focaltech.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio_mouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hgpk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hgpk.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lifebook.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lifebook.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
logibm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
logips2pp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
logips2pp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
maplemouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
navpoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc110pad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psmouse-base.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psmouse-smbus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psmouse.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa930_trkball.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpcmouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sentelic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sentelic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sermouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synaptics.c Input: psmouse - fix fast_reconnect function for PS/2 mode 2024-11-08 11:25:50 +01:00
synaptics.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synaptics_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synaptics_usb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
touchkit_ps2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
touchkit_ps2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trackpoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trackpoint.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmmouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmmouse.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsxxxaa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00