From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932807AbcITStn (ORCPT ); Tue, 20 Sep 2016 14:49:43 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34517 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbcITStl (ORCPT ); Tue, 20 Sep 2016 14:49:41 -0400 From: Nicolai Stange To: Mika Westerberg Cc: Wolfram Sang , 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 References: <874m5ax3o4.fsf@gmail.com> <20160920135925.45450-1-mika.westerberg@linux.intel.com> Date: Tue, 20 Sep 2016 20:49:37 +0200 In-Reply-To: <20160920135925.45450-1-mika.westerberg@linux.intel.com> (Mika Westerberg's message of "Tue, 20 Sep 2016 16:59:25 +0300") Message-ID: <87y42mxv7i.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mika Westerberg writes: > 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 I've just retested this v2 explicitly and it works like a charm. Also, Reviewed-by: Nicolai Stange if you want. Thanks, Nicolai