[lvc-project] [PATCH] dvb-usb: dtv5100: rewrite i2c message usb_control send/recv

Sergey Nalivayko Sergey.Nalivayko at kaspersky.com
Fri Nov 21 16:07:32 MSK 2025


>On Wed, Nov 19, 2025 at 18:51, Alan Stern wrote:
>> Can't this problem be fixed more simply by setting the 
>> I2C_AQ_NO_ZERO_LEN_READ adapter quirk flag, as in some of Wolfram 
>> Sang's recent commits?

On Wed, Nov 19, 2025 at 22:40, Wolfram Sang wrote:
> I think so. Hmm, I searched the tree for potential candidates. Seems this slipped through :( For reference, I fixed it in another media driver with commit b5ae5a79825b ("media: usb: hdpvr: disable zero-length read messages").

Thanks for your comment. Unfortunately, setting the I2C_AQ_NO_ZERO_LEN_READ adapter quirk does not solve the issue, as the problem occurs within the dtv5100_i2c_msg() function itself when it receives a message of NON-ZERO length. A message with length 1 arrives,  but it's expected only in the case of a combined write/read operation,  when two messages arrive simultaneously via the I2C interface (this is explicitly checked in the condition). If there's only one message, the  last parameter of the dtv5100_i2c_msg() function, rlen, is 0,  and a parameter inconsistency error occurs.



More information about the lvc-project mailing list