mbox series

[0/2] hw/i2c: Reset fixes

Message ID 20230320221419.2225561-1-komlodi@google.com
Headers show
Series hw/i2c: Reset fixes | expand

Message

Joe Komlodi March 20, 2023, 10:14 p.m. UTC
Hi all,

This series fixes some I2C state variables not being reset when a reset
would happen.

These stale variables would infrequently cause issues, something around
the order of 5/1000 runs, since the machine would have to be reset at a
point where they would be in a state that would cause problems.

Thanks!
Joe

Joe Komlodi (2):
  hw/i2c: smbus_slave: Reset state on reset
  hw/i2c: core: Add reset

 hw/i2c/core.c        | 25 ++++++++++++++++++++++---
 hw/i2c/smbus_slave.c |  9 +++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

Comments

Corey Minyard March 20, 2023, 10:56 p.m. UTC | #1
On Mon, Mar 20, 2023 at 10:14:17PM +0000, Joe Komlodi wrote:
> Hi all,
> 
> This series fixes some I2C state variables not being reset when a reset
> would happen.
> 
> These stale variables would infrequently cause issues, something around
> the order of 5/1000 runs, since the machine would have to be reset at a
> point where they would be in a state that would cause problems.

These look good to me.  Definitely a missing needed function.  Looking
through the way it's handled, I think the proper things are being reset
and the proper ones are being left alone.  There's no checking of the
reset type, but there's only one reset type right now, so I guess any
changes due to reset type will have to come when new types come.

Acked-by: Corey Minyard <cminyard@mvista.com>

for another tree, or I can take them.

Thanks,

-corey

> 
> Thanks!
> Joe
> 
> Joe Komlodi (2):
>   hw/i2c: smbus_slave: Reset state on reset
>   hw/i2c: core: Add reset
> 
>  hw/i2c/core.c        | 25 ++++++++++++++++++++++---
>  hw/i2c/smbus_slave.c |  9 +++++++++
>  2 files changed, 31 insertions(+), 3 deletions(-)
> 
> -- 
> 2.40.0.rc2.332.ga46443480c-goog
>