Skip to content

Commit d71eb58

Browse files
Hans Verkuilkelmously
authored andcommitted
Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers"
BugLink: https://bugs.launchpad.net/bugs/1864710 commit 8ff771f upstream. This reverts commit a284e11. 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 <[email protected]> Reported-by: Timo Kaufmann <[email protected]> Fixes: a284e11 ("Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Khalid Elmously <[email protected]>
1 parent 732e1ca commit d71eb58

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/input/rmi4/rmi_smbus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,
163163
/* prepare to write next block of bytes */
164164
cur_len -= SMB_MAX_COUNT;
165165
databuff += SMB_MAX_COUNT;
166+
rmiaddr += SMB_MAX_COUNT;
166167
}
167168
exit:
168169
mutex_unlock(&rmi_smb->page_mutex);
@@ -214,6 +215,7 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,
214215
/* prepare to read next block of bytes */
215216
cur_len -= SMB_MAX_COUNT;
216217
databuff += SMB_MAX_COUNT;
218+
rmiaddr += SMB_MAX_COUNT;
217219
}
218220

219221
retval = 0;

0 commit comments

Comments
 (0)