Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5639633imu; Mon, 26 Nov 2018 03:22:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/XSlmLngMCbPM8etVBd9usb92c3NGnb5kvVgbS2ET3r2EcZak+PV2lStwcYq0aBpOhvCCaf X-Received: by 2002:a63:1a4b:: with SMTP id a11mr24633425pgm.254.1543231362038; Mon, 26 Nov 2018 03:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543231362; cv=none; d=google.com; s=arc-20160816; b=GsB5H1leCea/Q5AT84W3bKOKO7+aGuYEN1sGaLH4MwPgirPuyZWDkwHaxMrYAlb/m5 v5auUIrJvSR188OJKk0N2epVRW/ITZISHmSlcLzmKptLz1qbHLSgA1qCUHBEKmS2KIjE iT3mp/UF1FCGGZtAdz91NQWd8D13169jefBrN4RYXqIbDl4lVSCwPX4ZuvUIidTIt8Ct N5+CpgMiEnqSA1lXX50GT6JbkcfwFp6DYv+DZSBMuL51YfQ1z+EYY8NhSm6kYoLHJrI8 CuYYj8b6wAGA0gL0qrk5JCqp+/csnymNsrN7dk9hQfDfhKmsr7rxwuu1QSg0LMoHPPJ8 qSAQ== 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=cJB1g6JmX9/9aKLQpX6uJdfPv2NwBzYuxg1VVqxrDb4=; b=ZQUHRCZr/aBhBiUZMnsF40JLuQhxPA0bf4TU6qCoKG4A1SsVPQxt4o5NbnFnTM3kZq WPTRag8819JvAUHDMkOcDCLylalzgrvcJIA4O10ZmMmo2gD0ug4sk6iC5DDU9OunLtqk LTWGspK3g5bpb26YvjJYSD8NpDXE6rKvQqt/rLOVqE+0ldoHZ5jqZZp20kc70oxWHSh9 p46vhMnenYSR/cvwA5MntNhZVp96ThxT+zQbGZsMK4CpGk8xHMjI/XTGomCNIaI/ONgA 13WXmHMy+ItsqvPOUvTwONdxNJTJ+In0EYHLmDzjnG3gBv+vQlmDudF8H/3SWNzkIAlq DyZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oF5NYq80; 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 cd2si24659plb.39.2018.11.26.03.22.26; Mon, 26 Nov 2018 03:22:41 -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=oF5NYq80; 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 S1729190AbeKZVwC (ORCPT + 99 others); Mon, 26 Nov 2018 16:52:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:33370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbeKZVwB (ORCPT ); Mon, 26 Nov 2018 16:52:01 -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 B5FA72146F; Mon, 26 Nov 2018 10:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229896; bh=TYiJyZKiwOYnJF1mkgLeYc6/iYxeEci75Pl4vYVW8P0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oF5NYq80da07MZ6XrcMMpq8PfDIvXVgxF1JUGmAbYm+hMz6bybJtiimJTL0EE+I+Y ofsgeggvuzTMxJIytqUto3XdIn+j9wxvhpRbV+vn0lqUMpeSTzIch47V6cz8PrEFDS l120hG2vaHm4onaiIZ72190+MEZpLOVwU+Pmr/nI= 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.9 43/46] ACPI / platform: Add SMB0001 HID to forbidden_id_list Date: Mon, 26 Nov 2018 11:51:32 +0100 Message-Id: <20181126105050.156584655@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105045.447291262@linuxfoundation.org> References: <20181126105045.447291262@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.9-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}, };