Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita2bd970

Browse files
nvincent-vosslohwsakernel
authored andcommitted
i2c: cpm: Fix i2c_ram structure
the i2c_ram structure is missing the sdmatmp field mentionned indatasheet for MPC8272 at paragraph 36.5. With this field missing, thehardware would write past the allocated memory done throughcpm_muram_alloc for the i2c_ram structure and land in memory allocatedfor the buffers descriptors corrupting the cbd_bufaddr field. Since thisfield is only set during setup(), the first i2c transaction would workand the following would send data read from an arbitrary memorylocation.Fixes:61045db ("i2c: Add support for I2C bus on Freescale CPM1/CPM2 controllers")Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>Acked-by: Jochen Friedrich <jochen@scram.de>Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent845b891 commita2bd970

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎drivers/i2c/busses/i2c-cpm.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ struct i2c_ram {
6565
charres1[4];/* Reserved */
6666
ushortrpbase;/* Relocation pointer */
6767
charres2[2];/* Reserved */
68+
/* The following elements are only for CPM2 */
69+
charres3[4];/* Reserved */
70+
uintsdmatmp;/* Internal */
6871
};
6972

7073
#defineI2COM_START0x80

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp