linux/drivers/net/mctp
Matt Johnston fa9861e5c8 mctp i2c: initialise event handler read bytes
[ Upstream commit 2a14e91b6d ]

Set a 0xff value for i2c reads of an mctp-i2c device. Otherwise reads
will return "val" from the i2c bus driver. For i2c-aspeed and
i2c-npcm7xx that is a stack uninitialised u8.

Tested with "i2ctransfer -y 1 r10@0x34" where 0x34 is a mctp-i2c
instance, now it returns all 0xff.

Fixes: f5b8abf9fc ("mctp i2c: MCTP I2C binding driver")
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20260113-mctp-read-fix-v1-1-70c4b59c741c@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:01 -05:00
..
Kconfig net: mctp-serial: Add kunit test for next_chunk_len() 2024-09-01 18:14:01 +01:00
Makefile mctp i3c: MCTP I3C driver 2023-10-17 12:45:03 +02:00
mctp-i2c.c mctp i2c: initialise event handler read bytes 2026-03-04 07:20:01 -05:00
mctp-i3c.c net: mctp i3c: Copy headers if cloned 2025-03-22 12:54:11 -07:00
mctp-serial.c TTY/Serial driver update for 6.12-rc1 2024-09-26 09:59:50 -07:00