Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2554365imm; Thu, 7 Jun 2018 12:38:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLAMUqoM/iopewBb6apFoXNtMgt6QoZ2cxmyVZwSFeoid8fkn6ZnolcOaPoXtP9gOK7/+ik X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr3368938plk.217.1528400311444; Thu, 07 Jun 2018 12:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528400311; cv=none; d=google.com; s=arc-20160816; b=brG/eWZo6jZTdEICp5jqpK9ibogMzT5Qjxae6MWvnWoo4KTigWaSK+U9brw6sFBBbo Jw5ULvTlDxHk41zVY/ztbFjaa0c7eKAGYv9GtQp0S4SNcSP2rzrDmXfrV6kkre7SSyUe GqW+VSs6wBSy3VV0KgXyEGV11SMAvW8uOYGWpOFF8ASSnL0+U4DSsfp9hVTArZz8K4P/ V77qeGW4igQNrko4FPK/Mw9c+zTqoAU4AUsX1TrWwoSEAn8jwVqDjiUjgrdLWtlT/ktS SFEweZxb1Ju6ZTdRDsfv2YrXQPD/eHjSKSYIKgtCmBgy1OCnb9C0kMximHFlZUjeqmtL cEZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=EDFzg7yHcMkki5gobLgrIzHSDEIDAYiPYLkosue7+PU=; b=pfWKceqW0kygVYLdwZJVv25Z5v1fcLL2Fm9DoT++GYe9o1fR+Tw2VFkIO0C3hNJLEq fV3WiGNvvk4RJwGL1y3vyzJ/UBAkO6KLt5g14kCnyuFBowXePNsbHXuHzK1OiHFeq8t/ 9uEkjDnd45MmHpXqYpXJDzyiEgdX0mAFnhY33QjTlJxUmNEtlFmILxLzMe3094wA25PD F07eswprPrh3kP1zc2P/NnUgxRE5kh2olScd5OLSvA4bmoibNBV6YKVoeyZLdTiXxExA K9BhPURN0YyCMDWUhfM4RxCSmBtmPUO5zpnxStt6ZtwwcngMFwImvlQIpFolzH+Hsadp Wc8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DgmuyJU0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si53107570pld.189.2018.06.07.12.37.10; Thu, 07 Jun 2018 12:38:31 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DgmuyJU0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbeFGTdw (ORCPT + 99 others); Thu, 7 Jun 2018 15:33:52 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:46991 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbeFGTdu (ORCPT ); Thu, 7 Jun 2018 15:33:50 -0400 Received: by mail-oi0-f68.google.com with SMTP id h79-v6so9665879oig.13; Thu, 07 Jun 2018 12:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EDFzg7yHcMkki5gobLgrIzHSDEIDAYiPYLkosue7+PU=; b=DgmuyJU0JE7viG65OzO3fZ7q1CfCBPgUy5Dtdwhy7DmSHWQLbJS5OnG66zQh/KrBfn OKoQGHPlvK5x7IDNKDZaZKbWJJKhjf0HkZMsm+N55eaCqG49ENXbQnAt+zZF4GmlWtiy nqL8G39XdLvtEMNikpHR4pY36l9nC3r356xg7Z461DwHyxjY20tZOxkz4wg1rDPNNpCC EGkPUG5nqCMAawQjYkz5ibbVvcPrA0B8sGHBYbVy8BSYoaSHFSEliYocVrTWdDfZih1c Y8KATHBrlajdzMIxWyV87xGlLHTu6S0Dcr51oQi52i6jN3PX6sLIftos2IKNrCa0Cntg QFlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EDFzg7yHcMkki5gobLgrIzHSDEIDAYiPYLkosue7+PU=; b=Hy4wtd0O+moqybCvUYlc7lv0vQQg1eTmYVv/NN0vaAfGWHZH4nY/95r5fcn2PNXyGB oMt4BzrnLGsIv1soZDSgVd0Tm4WJDFOFPu6fj2pr6JsErS9Zyixr6rgateaa4ArCmqT2 E6YMdFOSeYbwscqN5AlSM9XeqaUqNU4io0PlgpXEs25wVFQzr4WqSB75bAHnc4Y4N6RX 4nLIz/OPCUsNhv39aVs4xsWyJCBDVprvsWlE2nAcQj1JX8xbCc4VDis0K540D0sD3kN/ a/mTX4uNW43sHOpjUCtF/w4ajzah5FWRr74Fr2+86LRrfy0MOeLsUlhmdJifUF6a7him VCQA== X-Gm-Message-State: APt69E0ipTpfMvzGDwIBQ/CajOPJJUcNYWkYR7dGKfrMbWKfFPWSZl/Q UjfQtjoFjtRCzpdBVoNy4kUfIsCc X-Received: by 2002:aca:cf84:: with SMTP id f126-v6mr1688474oig.131.1528400029667; Thu, 07 Jun 2018 12:33:49 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-201-114-184.hsd1.tx.comcast.net. [98.201.114.184]) by smtp.gmail.com with ESMTPSA id g36-v6sm7400877otb.54.2018.06.07.12.33.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 12:33:49 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org Cc: alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, keith.busch@intel.com, Alexandru Gagniuc , "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI/AER: Fix aerdrv loading with "pcie_ports=native" parameter Date: Thu, 7 Jun 2018 14:33:40 -0500 Message-Id: <20180607193341.18891-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 table 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 --- drivers/pci/pcie/aer/aerdrv_acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c index 08c87de13cb8..4b491851a781 100644 --- a/drivers/pci/pcie/aer/aerdrv_acpi.c +++ b/drivers/pci/pcie/aer/aerdrv_acpi.c @@ -101,7 +101,7 @@ static void aer_set_firmware_first(struct pci_dev *pci_dev) rc = apei_hest_parse(aer_hest_parse, &info); - if (rc) + if (rc || pcie_ports_native) pci_dev->__aer_firmware_first = 0; else pci_dev->__aer_firmware_first = info.firmware_first; @@ -135,6 +135,8 @@ bool aer_acpi_firmware_first(void) apei_hest_parse(aer_hest_parse, &info); aer_firmware_first = info.firmware_first; parsed = true; + if (pcie_ports_native) + aer_firmware_first = 0; } return aer_firmware_first; } -- 2.14.3