From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84ABEC4360C for ; Thu, 10 Oct 2019 18:27:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53D2E20659 for ; Thu, 10 Oct 2019 18:27:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KVKyWAIn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53D2E20659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JRvC/4mYjxLuprOpygtxXlYjJcsrQ6YgTvE2nWZeDRg=; b=KVKyWAInQGasjdOk8lEz7iBzN AMYVxPSuhn0AjaTRwczwW1T29oK62lENn0nQDxwvVPxfOpBt5BQfnAZv67LQhHY4hkzXsZu9ELDHg jLV40BnG6ZHabXZnMTAE7qgKj7CqYJdrb8agdSgBfYW0koJW4VQvDHVE5hHG5KkNZU9WrwgH/UqCs V3aHzt/CJZHlOPOaei6Yk9ELEOZCXJuduxtj0P8BOlRt6Qo0TiP38fv+8Y8/hMUVPRXi8B8P4/hft +lbkAqiGyiS4Vh27UOz3zu2QvRgu87Mc3gkA0hQV5UQTcvyrdyeRtKhqvXNuygT/KUqIU3IiyUahX 2ylni68Xw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iId9q-00071u-Lk; Thu, 10 Oct 2019 18:27:26 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iId79-0002TA-3i for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2019 18:24:41 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2019 11:22:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,281,1566889200"; d="scan'208";a="184507020" Received: from yoojae-mobl1.amr.corp.intel.com (HELO [10.7.153.148]) ([10.7.153.148]) by orsmga007.jf.intel.com with ESMTP; 10 Oct 2019 11:22:36 -0700 Subject: Re: [PATCH] i2c: aspeed: fix master pending state handling To: Joel Stanley References: <20191009212034.20325-1-jae.hyun.yoo@linux.intel.com> From: Jae Hyun Yoo Message-ID: <8586205c-1edc-dfc2-3309-11050afbbaf8@linux.intel.com> Date: Thu, 10 Oct 2019 11:22:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191010_112439_191588_C27F4540 X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel