Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers"

This reverts commit a284e11c371e446371675668d8c8120a27227339.

This causes problems (drifting cursor) with at least the F11 function that
reads more than 32 bytes.

The real issue is in the F54 driver, and so this should be fixed there, and
not in rmi_smbus.c.

So first revert this bad commit, then fix the real problem in F54 in another
patch.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Timo Kaufmann <timokau@zoho.com>
Fixes: a284e11c371e ("Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200115124819.3191024-2-hverkuil-cisco@xs4all.nl
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Hans Verkuil and committed by
Dmitry Torokhov
8ff771f8 6b32391e

+2
+2
drivers/input/rmi4/rmi_smbus.c
··· 163 163 /* prepare to write next block of bytes */ 164 164 cur_len -= SMB_MAX_COUNT; 165 165 databuff += SMB_MAX_COUNT; 166 + rmiaddr += SMB_MAX_COUNT; 166 167 } 167 168 exit: 168 169 mutex_unlock(&rmi_smb->page_mutex); ··· 215 214 /* prepare to read next block of bytes */ 216 215 cur_len -= SMB_MAX_COUNT; 217 216 databuff += SMB_MAX_COUNT; 217 + rmiaddr += SMB_MAX_COUNT; 218 218 } 219 219 220 220 retval = 0;