[PATCH v5 1/3] i2c: xiic: preserve PEC byte length in SMBus block read setup
Abdurrahman Hussain
abdurrahman at nexthop.ai
Wed Sep 23 18:44:21 PDT 2026
On Wed Sep 23, 2026 at 11:04 AM PDT, Andi Shyti wrote:
>> + /*
>> + * Undo the setup-time padding before rx_msg is cleared,
>> + * so the PEC check sees the right byte.
>> + */
>> + if (i2c->rx_msg && i2c->smbus_actual_len)
>> + i2c->rx_msg->len = i2c->smbus_actual_len;
>
> I think this restore needs to go also in xiic_recv_atomic.
>
> Andi
>
Yes. I2C_M_RECV_LEN forces standard mode for the whole transfer, so an
atomic block read hits the same padded branch and then completes in
xiic_recv_atomic() without the trim.
v6 pulls the trim into a xiic_smbus_trim_len() helper and calls it from
both sites that clear rx_msg. Patches 2 and 3 unchanged.
Abdurrahman
More information about the linux-arm-kernel
mailing list