Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5605457imu; Mon, 26 Nov 2018 02:54:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/VgNu+u6LiaJGqUKHQbMnGiDbBFQECOFLaOHq9/S2BFh97mat9cZNomqQB0EIjKfJGcW+m7 X-Received: by 2002:a17:902:b68d:: with SMTP id c13mr27078366pls.102.1543229670036; Mon, 26 Nov 2018 02:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229670; cv=none; d=google.com; s=arc-20160816; b=ZKd8VZjzdA0tDS8fUFxdBWUrUVW9mAtihwegNighgryE8kQGsbhURBcmZcqQsGN3fZ WHiQqX4Zo7O/uwO8DXnsDqNPuzYrriSci4IWgo4/oomNjRp2atJhRtg0Z5Rr17GVJXSM P4Rj2KiJmTXLzQJHvWyuKzW5SMfX5pUk5rK1TcubTq0HrHYTwkmIBGJDf9d1JdwzPJQy 4KFWzWuBjaXvarSmUfIpPcXhnxg9Zp6iz6jRwMT5qCIAMiJDQkQ7TPVsQNjAT2v89KO7 nzZ4vO6uXpJzgoHFvEOJffNNv2dPrF/DKKxzSaGKK/g+5i4hg+Q5PASuuqcuqpQOn1vE XxoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s8mWit+JtjC7Xd7dcQldix9LNNEKKEv5HjdA4mM0188=; b=ZVCopU7+mvwxkhk/WeR0CshHRK3O8IGsXsJIs+iMfODuiVl67b5gOqB18m9EOrB58m G9DqmAPCabi3G0kzCZH2JMWc7Wz5m/o0hpksVIYnZMWxR43DJpYt8ZnXUzpkNQ7797cD HTr2/4+msHPlUIq8y4D0dWt0eRCLjW1/oMZOW1lx9kTNeYhAPyN0yTKTum7vR12bfrP6 ia1DP3EZ7CHDCpBsCs+dpazmx5nEhmDwt0MT7c4IsGQxggz24MogLp4BwjenZtGsYxfk DHUrp4O8VUffjsrBCfu1OORghHq8JkqusZLtrjqPTgINo079Nrux3sGP74QZqLFfcfO5 gCYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vhxv0xzH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g32si61643617pgg.400.2018.11.26.02.54.15; Mon, 26 Nov 2018 02:54:29 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Vhxv0xzH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbeKZVq5 (ORCPT + 99 others); Mon, 26 Nov 2018 16:46:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:54914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726274AbeKZVq4 (ORCPT ); Mon, 26 Nov 2018 16:46:56 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 154532146F; Mon, 26 Nov 2018 10:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229592; bh=MyJGiczUzL+hkEX4C1eDkeksxoziWhKUubChwvbDxO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vhxv0xzH7hgTpcy/UoTGLv/m4rky2OWndoEeBgqqcmis5oVfS0nFTLvsOdOoZAtQH HRtqlKbycLDyXjIT6vhvgF/Yg16Y34DQCeTYHbp7PBIYq2T+7IhpQDjkha06Q26VH/ jhqINRMUtfRWM0aHAuaoU2ilhZlpyANqJ39TP3Uc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Kahnert , Marc , Hans de Goede , "Rafael J. Wysocki" Subject: [PATCH 3.18 22/24] ACPI / platform: Add SMB0001 HID to forbidden_id_list Date: Mon, 26 Nov 2018 11:51:16 +0100 Message-Id: <20181126105032.727880823@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105029.790599475@linuxfoundation.org> References: <20181126105029.790599475@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede commit 2bbb5fa37475d7aa5fa62f34db1623f3da2dfdfa upstream. Many HP AMD based laptops contain an SMB0001 device like this: Device (SMBD) { Name (_HID, "SMB0001") // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0B20, // Range Minimum 0x0B20, // Range Maximum 0x20, // Alignment 0x20, // Length ) IRQ (Level, ActiveLow, Shared, ) {7} }) } The legacy style IRQ resource here causes acpi_dev_get_irqresource() to be called with legacy=true and this message to show in dmesg: ACPI: IRQ 7 override to edge, high This causes issues when later on the AMD0030 GPIO device gets enumerated: Device (GPIO) { Name (_HID, "AMDI0030") // _HID: Hardware ID Name (_CID, "AMDI0030") // _CID: Compatible ID Name (_UID, Zero) // _UID: Unique ID Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) { 0x00000007, } Memory32Fixed (ReadWrite, 0xFED81500, // Address Base 0x00000400, // Address Length ) }) Return (RBUF) /* \_SB_.GPIO._CRS.RBUF */ } } Now acpi_dev_get_irqresource() gets called with legacy=false, but because of the earlier override of the trigger-type acpi_register_gsi() returns -EBUSY (because we try to register the same interrupt with a different trigger-type) and we end up setting IORESOURCE_DISABLED in the flags. The setting of IORESOURCE_DISABLED causes platform_get_irq() to call acpi_irq_get() which is not implemented on x86 and returns -EINVAL. resulting in the following in dmesg: amd_gpio AMDI0030:00: Failed to get gpio IRQ: -22 amd_gpio: probe of AMDI0030:00 failed with error -22 The SMB0001 is a "virtual" device in the sense that the only way the OS interacts with it is through calling a couple of methods to do SMBus transfers. As such it is weird that it has IO and IRQ resources at all, because the driver for it is not expected to ever access the hardware directly. The Linux driver for the SMB0001 device directly binds to the acpi_device through the acpi_bus, so we do not need to instantiate a platform_device for this ACPI device. This commit adds the SMB0001 HID to the forbidden_id_list, avoiding the instantiating of a platform_device for it. Not instantiating a platform_device means we will no longer call acpi_dev_get_irqresource() for the legacy IRQ resource fixing the probe of the AMDI0030 device failing. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1644013 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198715 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199523 Reported-by: Lukas Kahnert Tested-by: Marc Cc: All applicable Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_platform.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -29,6 +29,7 @@ static const struct acpi_device_id forbi {"PNP0200", 0}, /* AT DMA Controller */ {"ACPI0009", 0}, /* IOxAPIC */ {"ACPI000A", 0}, /* IOAPIC */ + {"SMB0001", 0}, /* ACPI SMBUS virtual device */ {"", 0}, };