[PATCH] i2c: aspeed: fix master pending state handling

Jae Hyun Yoo jae.hyun.yoo at linux.intel.com
Fri Oct 11 05:22:36 AEDT 2019


> Acked-by: Joel Stanley <joel at jms.id.au>

Thanks!

> While reviewing I was concerned about the locking in
> aspeed_i2c_master_xfer. It's a bit hairy, and I am not convinced it is
> without bugs.

The locking was already in there in aspeed_i2c_master_xfer but it
unlocks the protection to make a waiting for a completion. This code
is after the waiting so I added the locking to protect
'bus->master_state' variable which can be accessed from driver context
and from interrupt context.

Thanks,

Jae



More information about the Linux-aspeed mailing list