]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i2c: tiny-usb: disable zero-length read messages
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 22 May 2025 06:43:49 +0000 (08:43 +0200)
committerAndi Shyti <andi@zenone.zhora.eu>
Wed, 25 Jun 2025 20:49:57 +0000 (22:49 +0200)
commitcbdb25ccf7566eee0c2b945e35cb98baf9ed0aa6
tree80f2a3f91ec3736a0f338e0e38016b9a24c1f6fe
parent56ad91c1aa9c18064348edf69308080b03c9dc48
i2c: tiny-usb: disable zero-length read messages

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: e8c76eed2ecd ("i2c: New i2c-tiny-usb bus driver")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <stable@vger.kernel.org> # v2.6.22+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250522064349.3823-2-wsa+renesas@sang-engineering.com
drivers/i2c/busses/i2c-tiny-usb.c