Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3712384imm; Mon, 25 Jun 2018 03:26:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKj66ftaYej4doGFFhgZVwMZY2nk8tASbZ2os7P5AJEL+b4/z5LIG8KLvfezUcBgFtKzWUJ X-Received: by 2002:a17:902:5942:: with SMTP id e2-v6mr6329405plj.64.1529922409248; Mon, 25 Jun 2018 03:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529922409; cv=none; d=google.com; s=arc-20160816; b=W0Bg/HSptN0FkummnU0AhMdb6GNSvgMmH1mGc/qWwP+cq1aZfSlbr2/HhZkTSs4KZu /9VoAvwVhsvS9ZijdF84imj/NvAtqb2O8jNBG82DctLWbBQyOAzNVLa5FS/Aj2hMUMND EyVx0ODcv8DKJBBHbAxiEAKQNpLSzJ19tyLTZD3w/rwSDkL2nSnoDkF2YvGqT3/KYQSc WxQZ3Y3Z20CZ26dVLAm7KtJmAGQkpRc6BPuaVcyXhwnoGmigtXMibkLp0KfWS7vH1H48 Nz340Ppn5555jOocUB7idv3fzFyBkNLctPIEJXLCcAsXLPECtkqfzn+TaLfOKD5EODFz D7LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=U6In2DjloNzQMldTUlxD4VjxyAdt4l54xcW/V1/OBXM=; b=tOCiBjrDPtijwP4BFGrJd79TR1HDMUkcE/IFc/tKj8fPqE4FznNk2BAIW2x6oIl2cZ Tsrp4lTqnZagKOw+blviDpH3BuGv5Qf1h+ApLo8HbJYQpeR5u1jTPGm634c027pW8wRS LZssLdOy6aYrOCmSxnpvfoDE5TB5Na+8VTycETnTVxzJ3X64mmCBTkvoESFrOtaODVsm cHqS4cHl63uZA8um3AaEm7LZ860u8lEsSHg0Z9Salf8RqvsIDRrQ9fJwTeu+rh2jgzwZ V27sYuotSBTfFrHuVIqzOO7FXGo308PTnoUi7YYUN6NvImkYER9RFKyIAzvkKlZNONDw ZMKA== 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 d18-v6si11181551pgv.248.2018.06.25.03.26.34; Mon, 25 Jun 2018 03:26:49 -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 S1755230AbeFYKZG (ORCPT + 99 others); Mon, 25 Jun 2018 06:25:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:61150 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755164AbeFYKZD (ORCPT ); Mon, 25 Jun 2018 06:25:03 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2018 03:25:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,270,1526367600"; d="scan'208";a="240378231" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.42]) by fmsmga006.fm.intel.com with ESMTP; 25 Jun 2018 03:24:54 -0700 Date: Mon, 25 Jun 2018 13:24:54 +0300 From: Jarkko Sakkinen To: Peter Rosin Cc: linux-kernel@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , Brian Norris , Gregory Fong , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Sekhar Nori , Kevin Hilman , Haavard Skinnemoen , Kukjin Kim , Krzysztof Kozlowski , Orson Zhai , Baolin Wang , Chunyan Zhang , Wolfram Sang , Guenter Roeck , Crt Mori , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dmitry Torokhov , Antti Palosaari , Mauro Carvalho Chehab , Michael Krufky , Lee Jones , linux-integrity@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v2 01/10] tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT) Message-ID: <20180625102454.GA3845@linux.intel.com> References: <20180620051803.12206-1-peda@axentia.se> <20180620051803.12206-2-peda@axentia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180620051803.12206-2-peda@axentia.se> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 20, 2018 at 07:17:54AM +0200, Peter Rosin wrote: > Locking the root adapter for __i2c_transfer will deadlock if the > device sits behind a mux-locked I2C mux. Switch to the finer-grained > i2c_lock_bus with the I2C_LOCK_SEGMENT flag. If the device does not > sit behind a mux-locked mux, the two locking variants are equivalent. > > Signed-off-by: Peter Rosin Studied enough so that I can give Reviewed-by: Jarkko Sakkinen Do not have hardware to test this, however. /Jarkko