]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: robotfuzz-osif: disable zero-length read messages
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 22 May 2025 06:42:35 +0000 (08:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 09:00:11 +0000 (11:00 +0200)
commitc9036b6390afcd34c81cb64d3fb46a84c81abd4f
treec9d0199b28b502b0f154af34113b73488826771d
parent4841060d2e7a1b6547c7f3e98d4cdc52f03d9aa3
i2c: robotfuzz-osif: disable zero-length read messages

commit 56ad91c1aa9c18064348edf69308080b03c9dc48 upstream.

This driver passes the length of an i2c_msg directly to
usb_control_msg(). If the message is now a read and of length 0, it
violates the USB protocol and a warning will be printed. Enable the
I2C_AQ_NO_ZERO_LEN_READ quirk for this adapter thus forbidding 0-length
read messages altogether.

Fixes: 83e53a8f120f ("i2c: Add bus driver for for OSIF USB i2c device.")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250522064234.3721-2-wsa+renesas@sang-engineering.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-robotfuzz-osif.c