Received: by 2002:a4a:3008:0:0:0:0:0 with SMTP id q8-v6csp3433614oof; Mon, 10 Sep 2018 14:47:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYjHxgcI3XXAH21t6mAWDjP2VkReV6XbN27+4pL+/l9mgSH7ujJL4kz5xjYgTv7C0vbkN8q X-Received: by 2002:a63:1516:: with SMTP id v22-v6mr24801568pgl.150.1536616077850; Mon, 10 Sep 2018 14:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536616077; cv=none; d=google.com; s=arc-20160816; b=wJRbxGD9GzdOGTVv9zHtCv6ZMfOZfGH2ywu94MLWiwcpdrJXtRpMlOcyhEQqYhksgd gip3aPnSRbRhF/iCDluZdGAVBVua86hBYVjenaf19ls+i8agXB1d4arrwG72EQwn3yLs DgCvwdPAhGhq7QTUs1ZNuEC4g5afUHOgWDTHS4/FfAJHodRwrJ573Z9ircbJmCEXrmQs 2xrlr4R3IErc9h3iVEeu8AGf/0xneF7J0NleOjvKoS5L4gQ7JycgVQNyL7+GYMFq3AAV YYvpZprwIYokGo6CeXQgy1uq+EJEgM2TFdPmmrozkU6w7MkL1zGJzeLSaOYookstpL7/ c7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=sgK8/kdllPz0Vvem0LVUS2VfOydSZ1cuwzQxfpUE798=; b=Hxj5bmf0p/iFWxn9SGqHcz2wrdMQFsy5OyTXgeE3SyArPXoUVP4zy6KpsCVwkPYfUW xPt6SR4xarryp3iuicGVDoiqcP01l53ypl5t06TQIrWFIZeBrxeayKUFJoM2z5MBjF/Q v7d4EfCE6mAhDqeMNPlkQH23pd6gYDbP3rgcUL+z8sUrHZSebWDhPAUL3lhXBHrZRL6C ghX324JlJRSd2mzUof4FYuUwSMm8Ut91CviP+vRcwy+cH1IzQhU4Z8FSNM3oBS8bkDrG dmpw4y2lU6F52+cyWcxQj6KhLRkfVbC5NRZbjiuZZGouxYuSXi3UO/mczBHDUVUHHeA4 Y8Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h27-v6si18147258pgh.245.2018.09.10.14.47.42; Mon, 10 Sep 2018 14:47:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbeIKClv (ORCPT + 99 others); Mon, 10 Sep 2018 22:41:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:2481 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbeIKClv (ORCPT ); Mon, 10 Sep 2018 22:41:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 14:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,357,1531810800"; d="scan'208";a="256062306" Received: from maru.jf.intel.com ([10.54.51.80]) by orsmga005.jf.intel.com with ESMTP; 10 Sep 2018 14:45:33 -0700 From: Jae Hyun Yoo To: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , James Feist , Vernon Mauery , Jae Hyun Yoo Subject: [RFC PATCH i2c-next 0/2] i2c: aspeed: Add bus idle waiting logic for multi-master use cases Date: Mon, 10 Sep 2018 14:45:17 -0700 Message-Id: <20180910214519.14126-1-jae.hyun.yoo@linux.intel.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In multi-master environment, this driver side master cannot know exactly when peer master sends data to this side master so a case can be happened that this master tries to send data through the master_xfer function but slave data from peer master is still being processed by this driver. To prevent state corruption in the case, this patch adds checking if any slave operation is ongoing and it wait up to the timeout duration before starting a master_xfer operation. Please review this patch set. Thanks, -Jae Jae Hyun Yoo (2): dt-bindings: i2c: aspeed: Add 'idle-wait-timeout-ms' setting i2c: aspeed: Add bus idle waiting logic for multi-master use cases .../devicetree/bindings/i2c/i2c-aspeed.txt | 10 ++- drivers/i2c/busses/i2c-aspeed.c | 70 +++++++++++++++---- 2 files changed, 62 insertions(+), 18 deletions(-) -- 2.18.0