Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5621746imu; Mon, 26 Nov 2018 03:07:33 -0800 (PST) X-Google-Smtp-Source: AJdET5cDwrRcG98rgFMQ0m6BSugkuKR8fkW/BsamkAsXowm1ozCbEWFGZ9YTKjibnIrNMFlkEDy6 X-Received: by 2002:a62:4851:: with SMTP id v78mr27655399pfa.97.1543230453904; Mon, 26 Nov 2018 03:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543230453; cv=none; d=google.com; s=arc-20160816; b=xxq2AxueXfYiQpsxl/JAGL28fUmqpn7/9knBH/J2pRnO6Zk4Ez2PD/0M1Timwc9nVB IfDSGqlyBvXGUzTKA7DIUr79RUauBGPrPLVsjv+PJnTHRDaVG7tr3otNEJzKn9n/EM8g pMavuR4WRF95dH4/59HGCkWTeRUAO1quq5vtCrmiWXPu3dOmyhUGq0w2zQNn7/Ga+l1A GO1c/W+9YkVutZ8qvTqGyFuhplBW4iqaYU0ytSdt0JyzK24s38w8SUSexXiJG2tNZCbR DxGQnA8RTGB56bgOrZUVlIxzBk9hqR96lT4MQVGvH0t4lHkTZyNCm0M5GXNOtvmmsSj0 EhCQ== 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=wvbndzdob8v+IjS8tW9LBamanZTVlyO0weB4lKG0FkM=; b=hCQmGKzpYkfNHc5i8srG88MhPR7IVCrFcvdFnpQNM4XjquTAdsSRfptWKVBXXYWa1q C2HaLJ69/Wm5oVkCogt/Pnc0YgQWtK6tPfUpg9BOCRZPeD068oMgCNRNsafUvuAwZE3v T5d5VSL7adhupVaXvYTnrZqhSv0+ViHe3czg3X5kMUib3ZkxWeMSfruWEPLvh5tfqaC+ xRNuhc0B05BnKjdZpH4DM2KW7xvyapW99FJmqcMFYblg6S+3/EyLOWOkhCc2814Mf971 SQCk1nQ7e+Tt815jpq5eY9hhKRiAuklW3K0UGri2n5naIuumnM2e4hMao/S/AcTQW1KU 1Xtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z4JmYGrV; 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 a34si62808898pgm.427.2018.11.26.03.07.19; Mon, 26 Nov 2018 03:07:33 -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=Z4JmYGrV; 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 S1731614AbeKZWAW (ORCPT + 99 others); Mon, 26 Nov 2018 17:00:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:47206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729543AbeKZWAV (ORCPT ); Mon, 26 Nov 2018 17:00:21 -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 DA47F20672; Mon, 26 Nov 2018 11:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543230395; bh=6eJsKNhpnieVfLJ73j7MH6likSGUqw/FFeyIg0+Smz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4JmYGrVHgGOTWE24w69AiGhaGqwaWzLDJPOVRJSMhI9yY2u29T5T0lG6pYjFwgNz SIdfFDfePAIzvAN3zJwJ3CR6Q/8zENTSX7XO+ZHAvPXoJaW/+qiWs7jPQOgVhhm2bU nhlWT+E/W8VkUrsYTt5l9oxha7Yghdv9N+iBSSEU= 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 4.19 113/118] ACPI / platform: Add SMB0001 HID to forbidden_id_list Date: Mon, 26 Nov 2018 11:51:47 +0100 Message-Id: <20181126105106.289948551@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105059.832485122@linuxfoundation.org> References: <20181126105059.832485122@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 4.19-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 @@ -30,6 +30,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}, };