Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2502673imm; Mon, 24 Sep 2018 05:33:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+czKHvo1x1FE18qfDzR/1NtNhfn8mUQjAvzNrrNb/YZCAOi57KNbWAyB4LgNXM/uob/Pn X-Received: by 2002:a62:2e02:: with SMTP id u2-v6mr10303129pfu.134.1537792439606; Mon, 24 Sep 2018 05:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792439; cv=none; d=google.com; s=arc-20160816; b=JAmPV0z7EqGjsUwalOlqXftZxb46+ETdkMsiAeM2TOHaqyyfY6482kG2z4k/QEQvgU r+6cy/5f3MOCJrxVBCvB+KAJMQj0PIanFJNXPj1Dubw+9q0m7oGmVDJst4vnt/9m3QQs 0cBB0+NowJxPmk9hW1xMGvv+jGeGqzQ/pWGGMORb9q15+bH4uXuaNuN8denvszDmP8wz x+b+7IP422HL7IQHQ4BlZ5b8LWc2pGuQn5DfgiqJVZbvy3pUT14S5OWhYTfXnDqzsmRa kie1b/vEt/9djO/c67heA6HWrZysSJjM4UqUUv/xveCiqPpQH8CPP0IW6dcaio0OEfu5 gHdg== 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; bh=ffFzuNmrDx+gHlny7GONogL28W7NINA4AMQArkG3QTA=; b=lbtPX/E0KJ5dUf7VHpnULfJ0bpk3lMk8SVaDG4KH5BqwU8z49VS60dbiR4LER3UQpl 6SXLbWOSe1vDZuPqQLCdnjg/SMJ7mVnWZXmgdHD4jW3sfr+kVvdsMQx19fI3caK6R6hm bnxZnoJIZ3uzQeUmTJnp3oX0gXZVzEbujsfSDLw5tZOQjfpIqtmclcYJlK1VPXqsshvt HRIw8FmUHkjpkQKCdDOzbhzADoDJOPAaCKqw9Hu4lZzINqh18ISf2RB/1LvYUUbKiupH IlwtRUTo65UpOWuGRqnPhpaP28L/rCv1TrBmn0T75HF2w0YNNgkt9YILgdiADLIJWGoI LN+A== 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 ba6-v6si34715127plb.364.2018.09.24.05.33.44; Mon, 24 Sep 2018 05:33:59 -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 S2388207AbeIXSen (ORCPT + 99 others); Mon, 24 Sep 2018 14:34:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58276 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729816AbeIXSem (ORCPT ); Mon, 24 Sep 2018 14:34:42 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7AE3C109A; Mon, 24 Sep 2018 12:32:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandru Gagniuc , Bjorn Helgaas , Sasha Levin Subject: [PATCH 4.18 097/235] PCI/AER: Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST Date: Mon, 24 Sep 2018 13:51:23 +0200 Message-Id: <20180924113114.993184368@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexandru Gagniuc [ Upstream commit 7af02fcd84c16801958936f88b848944c726ca07 ] According to the documentation, "pcie_ports=native", linux should use native AER and DPC services. While that is true for the _OSC method parsing, this is not the only place that is checked. Should the HEST list PCIe ports as firmware-first, linux will not use native services. This happens because aer_acpi_firmware_first() doesn't take 'pcie_ports' into account. This is wrong. DPC uses the same logic when it decides whether to load or not, so fixing this also fixes DPC not loading. Signed-off-by: Alexandru Gagniuc [bhelgaas: return "false" from bool function (from kbuild robot)] Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pcie/aer.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -303,6 +303,9 @@ int pcie_aer_get_firmware_first(struct p if (!pci_is_pcie(dev)) return 0; + if (pcie_ports_native) + return 0; + if (!dev->__aer_firmware_first_valid) aer_set_firmware_first(dev); return dev->__aer_firmware_first; @@ -323,6 +326,9 @@ bool aer_acpi_firmware_first(void) .firmware_first = 0, }; + if (pcie_ports_native) + return false; + if (!parsed) { apei_hest_parse(aer_hest_parse, &info); aer_firmware_first = info.firmware_first;