Re: [PATCH v3 0/4] P2040/P2041 i2c recovery erratum

2021-05-12 Thread w...@kernel.org

> > I've been doing my recent work with a P2040 and prior to that I did test 
> > out the recovery on a T2081 (which isn't documented to have this 
> > erratum) when I was re-working the driver. The "new" recovery actually 
> > seems better but I don't have a reliably faulty i2c device so that's 
> > only based on me writing some code to manually trigger the recovery 
> > (using the snippet below) and observing it with an oscilloscope.
> 
> You don't need a faulty device, just an aborted I2C read/write op.

If you can wire GPIOs to the bus, you can use the I2C fault injector:

Documentation/i2c/gpio-fault-injection.rst

There are already two "incomplete transfer" injectors.



signature.asc
Description: PGP signature


Re: [PATCH v3 0/4] P2040/P2041 i2c recovery erratum

2021-05-25 Thread w...@kernel.org

> For those reading along the v2 mentioned in that thread was posted as 
> https://lore.kernel.org/linux-i2c/20170511122033.22471-1-joakim.tjernl...@infinera.com/
>  
> there was a bit of discussion but it seemed to die out without reaching 
> a conclusion.
> 
> The i2c-mpc driver is now using the generic recovery mechanism so that 
> addresses one bit of feedback from the original thread.

Yes, and the generic recovery has been improved since then. There is an
"incomplete_write_byte" fault injector now and the generic recovery
handles it correctly meanwhile. Before, it actually could cause a write
to happen but we are sending STOPs now.



signature.asc
Description: PGP signature