Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4293386pxk; Tue, 22 Sep 2020 15:57:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKrlqFkrA8Qt0FAf7P9jmEeocxFt5Ze7eNLgGKxKkgeK8SDFLVxswLa2qqJIunqz3UOOMl X-Received: by 2002:a17:906:7248:: with SMTP id n8mr7294594ejk.160.1600815423653; Tue, 22 Sep 2020 15:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600815423; cv=none; d=google.com; s=arc-20160816; b=JeueRq4oFF6775V+2Px98+7PPGqNOQcBL5hKe6pesn4PcOL+PJt9gA/ontcRHle8L7 sUk08r6+PJ7HPUHDa5ChfOsprV4KLzzaFVsCB79JRG3I9rQMY1LWPiMSGITYh8anal92 EgY4QSX4RmmtHAa/VYFelc/EHwK5cJKzKijSFj1DCec9gdwOQFnyBILuFUHcqEd+xgsZ F6tK0PPJx5NPQ3lcCuRolQ94br4NF/jmOpz/xhRtT5FMwhTWlXhlOIa2Mjbh4IXhUaGJ wbyXENv0ODNPQmSEVnle7ZuFxp7AVxnkbEmFwLEZCY0TQsRQ/htzUcGm4ihhyLTmols7 5Rgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=phIL1waZsLrTjpbItBSk9Y3qWphaNWEIyAqP/hDi1uE=; b=jhj5JbQe2iBhs3EreZDqd4vMGc0duGxAnurKAgTPLnqCBXGVpTPYq5AOi57lQmgTYG Xv6uiUGjCyhKFhiwcB1vG+FI638Yr3aN6owz1HQpAl5G4+RPeWnfrZmwFk9tOlq0b/lq 9ZB4Kgzr7dK0RhknK0WS/wLXDQrbP2iOtGbQ6IwJsVVDlp+vcBe7OpsxZyuZpSxR1grg h5OG9Q3AVJV6GyR0oZcxilhM8OLG+GVyHyKhTs3YZDBVXMgND8b1Ewxramq6uvfC0Ahx vsAU/4JKwzQQSWUP1MVTBzZezffsKqZAkQMDcyO2CMd1n/Lm7APBGMaYlyuNLXRojygs 89Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U4AhUWPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss23si11366402ejb.350.2020.09.22.15.56.40; Tue, 22 Sep 2020 15:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U4AhUWPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbgIVWwk (ORCPT + 99 others); Tue, 22 Sep 2020 18:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgIVWwf (ORCPT ); Tue, 22 Sep 2020 18:52:35 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E7AC0613D1; Tue, 22 Sep 2020 15:52:35 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id w11so19869796lfn.2; Tue, 22 Sep 2020 15:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=phIL1waZsLrTjpbItBSk9Y3qWphaNWEIyAqP/hDi1uE=; b=U4AhUWPRni+7mIqRn2Y/nwGe2DBuOloax8knJIR6ozXaSMFx6Lfz5Q8Fx7rSaQP33h MWvNQtLfqvTjkSNWNI7QNLC6EwpbR8ziD6wO1u4uDuNB1wn1uBlnfwAemJeUj7Grnr6P mD1gIz870jo4dfQI9V+CWtr/mf/Qcun4BUWBWcSVFZ4ukqrDpJKPeNU3yDNWWlDF1dxr /oKWcf8dvhxyAG7FWpDbh6+veKTHtD3VIvuHWaLmEcEa0vaRaBe+ZIIl3ZmxFOFkjLEk V26ygxkNocUa2VGZMZMmMs9fVwezpBW8Mif2/CibZtdvP1Y+omVP0mumVjYILSmAYIET yPiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=phIL1waZsLrTjpbItBSk9Y3qWphaNWEIyAqP/hDi1uE=; b=HaTbAH8s617Pj7QvelU5TfZFmFl5SAs2Xl3lFHkReaUzMsbK79NrLoenrv3ssVwZGc PdHcKilsq5XQS7Ay9LBKd0mMPv+h50KzTOwnvcBbLpF5MvxV4UOAknb+SH/0EkC+ciTa sRDPo9fg687yKsue7VJ/0K0ELL9YVwLNSLXWaQp3zi3K/QSHPWv/96NBRzzMYGjOG1aO 5Zls+v69p+EtDhwjNsNOD/hh9/Rad9qKGgnQBiP9pDWfZlmLxaIpRysdqpBGngdIHK8F eHAdURm6E+UWu9gv/Zz9y99C3js3hjJAb5yDde57fvERfK9Ewup7f0RwDWnqSzxWVUgs o9+g== X-Gm-Message-State: AOAM533e0/Ih2qyQnkXRCVc0YBc3w5rucNwASchkpxQdykM+rmKqejak FYblyvDUAoSaU4s5Gq1Xktw= X-Received: by 2002:ac2:53b3:: with SMTP id j19mr2673522lfh.101.1600815153681; Tue, 22 Sep 2020 15:52:33 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id l15sm3977588lfk.71.2020.09.22.15.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 15:52:33 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Andy Shevchenko Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 04/32] i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear() Date: Wed, 23 Sep 2020 01:51:27 +0300 Message-Id: <20200922225155.10798-5-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200922225155.10798-1-digetx@gmail.com> References: <20200922225155.10798-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The tegra_i2c_issue_bus_clear() may fail and in this case BUS_CLR_DONE stays unmasked. Hence let's mask it for consistency. This patch doesn't fix any known problems. Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 88d6e7bb14a2..1d1ce266255a 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1149,6 +1149,8 @@ static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) time_left = tegra_i2c_wait_completion_timeout( i2c_dev, &i2c_dev->msg_complete, 50); + tegra_i2c_mask_irq(i2c_dev, I2C_INT_BUS_CLR_DONE); + if (time_left == 0) { dev_err(i2c_dev->dev, "timed out for bus clear\n"); return -ETIMEDOUT; -- 2.27.0