Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5642362imu; Mon, 26 Nov 2018 03:25:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/WYCq5JlBvg/TVfICq6EXBIsmhqXvhNkaqfCSfUcvVTVfacDe9oGitTgnPqlvI2zkZ6kl5y X-Received: by 2002:a17:902:9f89:: with SMTP id g9mr27351900plq.214.1543231506436; Mon, 26 Nov 2018 03:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543231506; cv=none; d=google.com; s=arc-20160816; b=W2cuiyDpa0KIFLNtXV0G37lMCGz49NexmMJPSP6Q13JXVvcowXU7CcwkxGbaqRbvkP j27IuulxZhH4bGmZmp3Bbe83TBQxH6g//cax+d5VHc46zT7PUR7JM81DATELVEiNmM12 VvfNQO7nqGbaJfcgL++spkpicFuPruzvM8FEikZJ5VveQZOdbNQRn4uMJviO4QdSXTQm Ex8LiwXLZtxxVC0gClX6ieTuXIjOn9ATgFwW7Fauy28ohrAjU50SKwGC9JJVOc/qiJEI O5i95tLNyyWmhhnT4Xoik7XE545K36UkVdymgDw4LfAsrnLOFMljIp6mtVEXqagwrQA/ dKjg== 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=jVgrhQTL7dRYHhpX5/fB3oh63+4ilS+Uqr4i1SmRii0=; b=fix+KuxYTVncpJp9GS+41GNcPTeO6h5FszY8uYOCe+VrWdMnPJgkQlvz2qy5WJ8HO1 gUbJsYNwMFw6qRr+rI2KadD+/t9cDg58f2E2fj9BUbYamxtLtchnXvR1BkXogqKGh/uh y8e69vqYiPP5wjukoBzCQBVlbpRXRE1WPGFIcXyMJqPlNvTqVAq3ZABpPYrfdyPXhfYQ IvDnlnsNe1+r+X6oIU4mNprsYXvMfmF8370oiHyqHc0NT4SHmMbANw4KhH+zclN3y94f rIXSWOgKXy3bcV3nxlxoIoJq2r8CdClamtMefAuycAF3Ip+0uUJcKSqFjr2WroWX/Rct R2zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CkSXMNS+; 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 l124si1024811pfl.284.2018.11.26.03.24.51; Mon, 26 Nov 2018 03:25:06 -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=CkSXMNS+; 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 S1728333AbeKZVuB (ORCPT + 99 others); Mon, 26 Nov 2018 16:50:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:59086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbeKZVuA (ORCPT ); Mon, 26 Nov 2018 16:50:00 -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 7D2A720817; Mon, 26 Nov 2018 10:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229776; bh=LZSYPzeNML9vuBugSGWnapQwR2hJkQ+PldBYtd2MDx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CkSXMNS+wrYHqV9TPrBNnvgZLrXwhSj2dK0b89VOnKH3ezY3CtCy8vWzppTLLD845 722iEvUr2QPDGEW96jqGEXfKyEPD9h8RkOb0GX2/cLmHj3AMDqofJbRKx6ndqICUOL NBB8XNsHJHk8bA82OnUXz+9xVUyBX1OfSV62P0M4= 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.4 68/70] ACPI / platform: Add SMB0001 HID to forbidden_id_list Date: Mon, 26 Nov 2018 11:51:23 +0100 Message-Id: <20181126105053.089505074@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@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.4-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}, };