From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933252AbcIVIwl (ORCPT ); Thu, 22 Sep 2016 04:52:41 -0400 Received: from mga09.intel.com ([134.134.136.24]:45047 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933051AbcIVIwj (ORCPT ); Thu, 22 Sep 2016 04:52:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,378,1470726000"; d="scan'208";a="1060389796" Date: Thu, 22 Sep 2016 11:49:30 +0300 From: Mika Westerberg To: Wolfram Sang Cc: Nicolai Stange , Octavian Purdila , "Rafael J . Wysocki" , Jarkko Nikula , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] i2c / ACPI: Do not touch an I2C device if it belongs to another adapter Message-ID: <20160922084930.GI1218@lahna.fi.intel.com> References: <874m5ax3o4.fsf@gmail.com> <20160920135925.45450-1-mika.westerberg@linux.intel.com> <20160921054834.GC1484@katana> <20160921084502.GV1811@lahna.fi.intel.com> <20160921161435.GA1432@katana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160921161435.GA1432@katana> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 21, 2016 at 06:14:38PM +0200, Wolfram Sang wrote: > On Wed, Sep 21, 2016 at 11:45:02AM +0300, Mika Westerberg wrote: > > On Wed, Sep 21, 2016 at 07:48:35AM +0200, Wolfram Sang wrote: > > > On Tue, Sep 20, 2016 at 04:59:25PM +0300, Mika Westerberg wrote: > > > > When enumerating I2C devices connected to an I2C adapter we scan the whole > > > > namespace (as it is possible to have devices anywhere in that namespace, > > > > not just below the I2C adapter device) and add each found device to the I2C > > > > bus in question. > > > > > > > > Now after commit 525e6fabeae2 ("i2c / ACPI: add support for ACPI > > > > reconfigure notifications") checking of the adapter handle to the one found > > > > in the I2cSerialBus() resource was moved to happen after resources of the > > > > I2C device has been parsed. This means that if the I2cSerialBus() resource > > > > points to an adapter that does not exists in the system we still parse > > > > those resources. This is problematic in particular because > > > > acpi_dev_resource_interrupt() tries to configure GSI if the device also has > > > > an Interrupt() resource. Failing to do that results errrors like this to be > > > > printed on the console: > > > > > > > > [ 10.409490] ERROR: Unable to locate IOAPIC for GSI 37 > > > > > > > > To fix this we pass the I2C adapter to i2c_acpi_get_info() and make sure > > > > the handle matches the one in the I2cSerialBus() resource before doing > > > > anything else to the device. > > > > > > > > Reported-and-tested-by: Nicolai Stange > > > > Signed-off-by: Mika Westerberg > > > > > > Considering this for for-current. So shall we add: > > > > > > Fixes: 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications") > > > > > > ? > > > > Yes please :) > > Huh? It doesn't apply on top of rc7 here? What did you base it on? It is based on linux-next as it is on top of Jarkko's I2C ACPI namespace cleanup patches. I'm wondering if I make an updated patch on top of v4.8-rc7 does it conflict with the I2C stuff in linux-next? What's your preference?