Hello Francesco, On Fri, Jul 15, 2022 at 09:24:32AM +0200, Francesco Dolcini wrote: > On Fri, Jul 15, 2022 at 08:49:31AM +0200, Uwe Kleine-König wrote: > > Unless you have a multi-controller setup an arbitration loss is a > > problem with the signal integrity. And increasing the retry count is > > only a work around. > Fair enough. > > Regarding your comment, I was wondering: > > 1. There is currently no easy way to enable the retry on arbitration > lost at system level in case the I2C bus is multimaster. Unless we > consider setting the retries value using I2C_RETRIES ioctl the way to > go. Not my specific problem, but I wonder if this situation is relevant > in practice. I think multi-controller is quite unusual. I never saw one, but that might just be my bubble. > 2. We do have an I2C bus recovery mechanism implemented to recover from > a stuck bus, isn't this a workaround as retrying on arbitration lost in a > non-multimaster setup? It depends, if you do it to recover after a transfer failure, it would indeed consider it a work around covering the real problem. But sometimes there is no practical way around such work arounds. I happens from time to time that the reason for problem is known, but fixing the hardware is no option, then you need such workrounds. (This applies to both, retrying the transfers and resetting the bus.) Note that even without signal integrity problems an i2c bus can get stuck. E.g. if the controller resets in the middle of a transfer. > I guess this discussion is no longer about the original patch I sent, > but from my point of view still interesting, real-life I2C is not > perfect sometimes ... :-) Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature