[Skiboot] [PATCH] p8-i2c: Fix random data corruption

Stewart Smith stewart at linux.vnet.ibm.com
Thu Aug 31 14:08:12 AEST 2017


Oliver O'Halloran <oohall at gmail.com> writes:
> While waiting for the OCC to signal that it has finished using the I2C
> master we put the master into the, poorly named, occache_dis state.
> While in this state the transaction hasn't been started, but
> p8_i2c_check_status() will only skip it's checks when the master is in
> the idle state. Any action that checks that cranks the I2C state machine
> (interrupt, poll, etc) will call p8_i2c_check_status() and since the
> master is not idle, it will check the status register, see the
> transaction complete flag set and complete the i2c request without
> actually doing anything.
>
> If the transaction was a I2C read, the resulting output will be a
> zeroed data buffer.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

Aren't state machines fun! Merged in as
b73d15fa328ee242102dce4f7cda1cc650c787aa

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list