Re: [PATCH] mctp i2c: Requeue the packet when arbitration is lost

From: Jeremy Kerr
Date: Thu Nov 30 2023 - 03:03:18 EST


Hi Quan,

> If arbitration is lost, __i2c_transfer() returns -EAGAIN and the
> packet should be resent.
>
> Requeue the packet and increase collisions count on this case.

Are you sure you want to re-queue the packet here? The i2c core would
have already retried on arbitration loss:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/i2c/i2c-core-base.c#n2223

With this change, we would be disregarding the limits in adap->retries
and/or adap->timeout.

Cheers,


Jeremy