From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tao Ren Subject: Re: [PATCH] i2c: aspeed: fix master pending state handling Date: Thu, 10 Oct 2019 23:29:04 +0000 Message-ID: <49244d71-cbc3-f2ae-97ac-74b5f68a4816@fb.com> References: <20191009212034.20325-1-jae.hyun.yoo@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191009212034.20325-1-jae.hyun.yoo@linux.intel.com> Content-Language: en-US Content-ID: 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: Jae Hyun Yoo , Brendan Higgins , Wolfram Sang , Benjamin Herrenschmidt , Joel Stanley , Rob Herring , Mark Rutland , Andrew Jeffery , Cedric Le Goater Cc: "devicetree@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "openbmc@lists.ozlabs.org" List-Id: linux-i2c@vger.kernel.org On 10/9/19 2:20 PM, Jae Hyun Yoo wrote: > In case of master pending state, it should not trigger a master > command, otherwise data could be corrupted because this H/W shares > the same data buffer for slave and master operations. It also means > that H/W command queue handling is unreliable because of the buffer > sharing issue. To fix this issue, it clears command queue if a > master command is queued in pending state to use S/W solution > instead of H/W command queue handling. Also, it refines restarting > mechanism of the pending master command. > > Fixes: 2e57b7cebb98 ("i2c: aspeed: Add multi-master use case support") > Signed-off-by: Jae Hyun Yoo Tested-by: Tao Ren Tested the patch on Facebook Minipack BMC (multi-master i2c-0 environment) and everything looks good to me. Cheers, Tao