From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jae Hyun Yoo Subject: Re: [PATCH] i2c: aspeed: fix master pending state handling Date: Thu, 10 Oct 2019 11:22:36 -0700 Message-ID: <8586205c-1edc-dfc2-3309-11050afbbaf8@linux.intel.com> References: <20191009212034.20325-1-jae.hyun.yoo@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Joel Stanley Cc: Mark Rutland , devicetree , linux-aspeed , Wolfram Sang , Andrew Jeffery , Benjamin Herrenschmidt , OpenBMC Maillist , Brendan Higgins , Rob Herring , Cedric Le Goater , Tao Ren , Linux ARM , linux-i2c@vger.kernel.org List-Id: devicetree@vger.kernel.org > Acked-by: Joel Stanley 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