Skip to content

Commit 76ac84d

Browse files
Hans Verkuilgregkh
authored andcommitted
Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers"
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 <hverkuil-cisco@xs4all.nl> Reported-by: Timo Kaufmann <timokau@zoho.com> Fixes: a284e11 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ef2f9f3 commit 76ac84d

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
@@ -166,6 +166,7 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,
166166
/* prepare to write next block of bytes */
167167
cur_len -= SMB_MAX_COUNT;
168168
databuff += SMB_MAX_COUNT;
169+
rmiaddr += SMB_MAX_COUNT;
169170
}
170171
exit:
171172
mutex_unlock(&rmi_smb->page_mutex);
@@ -217,6 +218,7 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,
217218
/* prepare to read next block of bytes */
218219
cur_len -= SMB_MAX_COUNT;
219220
databuff += SMB_MAX_COUNT;
221+
rmiaddr += SMB_MAX_COUNT;
220222
}
221223

222224
retval = 0;

0 commit comments

Comments
 (0)