Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1110611imm; Wed, 1 Aug 2018 10:21:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2fnH9827DwhJCIrZxMl2sgg8hKLSfGhkvr2NMOsGJYEu3PeWYwbiRkvc+BB+ZbV6NUJzx X-Received: by 2002:a17:902:1682:: with SMTP id h2-v6mr25507764plh.327.1533144060770; Wed, 01 Aug 2018 10:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144060; cv=none; d=google.com; s=arc-20160816; b=cOqrsHiItLaw94kFHC2l+mC02kR9ofM4hL813DnPITokBAAZDs1xZvwOT7zKBmqKRk 2SBFJV55+1ee27tatWf0gWjMdMFiP7ztSiIpkLtolV/PoKe8Z50a8dxxjKU21oIMkj0X 5z9rj/SDUOmeGYJtDBULMTfRNgOH+YRSjsqCXA3eHeXnbu3oguvbMEmf/IVgkmo2wC0e KdAOHsff1ja3E2zbRN8XcJ6v6/HL6yLiprQqnqqWOY3qL5szMdgfTVckUp+hCORuNUFg YlxdvmiCdZwZl9zxvw/QYiDFuxpu3pX8lFs/6nWZ+OjsvsN3+CKDg1PzeKopphJOQre6 WZXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=BYZFnHPX6tX06ME8KT6dn1b07DRwCGuCvw7VnemG8to=; b=RRFRSihFtCnFa/q/N6x/foOStC4uhauDxaT2ubqAjlj/W1OaYQtYnD21/S5B1o7jU6 PzZGHhsClaOewjdQRNigryzt7Bj026b66qS0HWBUXgoo+jcOS5ZH2xhf84NENKPmqbFJ SD7PXkI/ZZuj1K+UyWUUixD7VLVxVyLY8q4HsH54suqB7MP4KNy4Oa47tVOeAoVQt6iJ 8gB0A6Eqm6TLUSdeMmV3nMFppY0ISa3vUHRY/aYJxHKfmO/lPj6kKdETW9Wf46B+fKeV FXBXB0rx6TZ56TcBMZ4U+T3UYlIH+oPMtu5KRFOdoZ2LbFV1UfHGee7ZANSqn5CKJRoQ VlQg== ARC-Authentication-Results: i=1; mx.google.com; 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 f17-v6si16031023pgl.59.2018.08.01.10.20.45; Wed, 01 Aug 2018 10:21:00 -0700 (PDT) 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; 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 S2405143AbeHATFx (ORCPT + 99 others); Wed, 1 Aug 2018 15:05:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48162 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403884AbeHATFw (ORCPT ); Wed, 1 Aug 2018 15:05:52 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E0955CC2; Wed, 1 Aug 2018 17:19:10 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Helgaas , Mika Westerberg , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 109/246] PCI: pciehp: Request control of native hotplug only if supported Date: Wed, 1 Aug 2018 18:50:19 +0200 Message-Id: <20180801165016.931161652@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mika Westerberg [ Upstream commit 408fec36a1ab3d14273c2116b449ef1e9be3cb8b ] Currently we request control of native PCIe hotplug unconditionally. Native PCIe hotplug events are handled by the pciehp driver, and if it is not enabled those events will be lost. Request control of native PCIe hotplug only if the pciehp driver is enabled, so we will actually handle native PCIe hotplug events. Suggested-by: Bjorn Helgaas Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/pci_root.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -472,9 +472,11 @@ static void negotiate_os_control(struct } control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL - | OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | OSC_PCI_EXPRESS_PME_CONTROL; + if (IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE)) + control |= OSC_PCI_EXPRESS_NATIVE_HP_CONTROL; + if (pci_aer_available()) { if (aer_acpi_firmware_first()) dev_info(&device->dev,