Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp827785ybp; Fri, 4 Oct 2019 05:41:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2iv1BA3suPBfYCH1R4iJUviuk9pAzBVOGi8h2AcjEACgazzjCvieRIc+jbyHTibEIwjqi X-Received: by 2002:a50:aa86:: with SMTP id q6mr15326492edc.288.1570192893008; Fri, 04 Oct 2019 05:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570192893; cv=none; d=google.com; s=arc-20160816; b=oEhpmYJfyNMEx3sVdEz52McF5QTUTRbbzakpCG2xtlqCBNrH6Sl+P9HefYphuMZUSm 0aTlfvtbnjWnF7TBQQt5659EkoQbFvQ3qONQrpjAeo8aOqkvvy7wKy8Sx/9ntx1FCJDU tPYWRmtn/sYKGS+A10n4TxbgTukKFPFkRFw7p7/YogsjMhdCbE3FNQ9994AVPcoRYmCG hgA8lELQlWsdqzL862gK6wn5ABCxm6iWx4TKWL9cqoAL8cQVS67tinIOAj0EIADjt8lG 73al4q+MyjMWOxJLD3yyQfRXSm437/bqfyf7gj1Y4A7KlMzz2A/cWfJi0lxDQMDrv9Jp ciow== 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 :message-id:date:subject:cc:to:from; bh=gpB0hq2JRSzqgjy7LfllM4txVspWJZ4zqQm9v3Wg+7Y=; b=0UddboW9IaNlkSHsJoQDrn8klaJIkWAoFzTTHzSuV+BuDXLbLNB8JV8sPgJevojolV 09KyF3LONEd6ty35Vd4gnA85BjMLok8IBGIO+61OU9SCKtYh3OZ6raKswYZB4WLgYCeL Pmu54cS04c0mfCZ7GwXLhFuqkjCdpOb02xrsiQqjvjX/xLuBTw8kPFTfsQc+yjJuDeOV EvHaHfkJ2E45JXjZh+xQxUWARs3hmTFtLFjJwhLIaRg/yNPL/6Y/SZZzSd32M9q/6PlB 2c/kSofrJCMXM+ZYwyPpmtxU8fhXA+H35oMAOZP18+OK7XJrgHRg49aPqQ3cNoGji9Io JFcw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si2820850eje.338.2019.10.04.05.41.08; Fri, 04 Oct 2019 05:41:32 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387784AbfJDMjx (ORCPT + 99 others); Fri, 4 Oct 2019 08:39:53 -0400 Received: from mga06.intel.com ([134.134.136.31]:46473 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387412AbfJDMjw (ORCPT ); Fri, 4 Oct 2019 08:39:52 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2019 05:39:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,256,1566889200"; d="scan'208";a="222127758" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 04 Oct 2019 05:39:48 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id AFFDB14E; Fri, 4 Oct 2019 15:39:47 +0300 (EEST) From: Mika Westerberg To: Bjorn Helgaas , "Rafael J. Wysocki" Cc: Len Brown , Lukas Wunner , Keith Busch , Alex Williamson , Alexandru Gagniuc , Kai-Heng Feng , Matthias Andree , Paul Menzel , Nicholas Johnson , Mika Westerberg , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] PCI: Add missing link delays Date: Fri, 4 Oct 2019 15:39:45 +0300 Message-Id: <20191004123947.11087-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is second version of the reworked PCIe link delay patch posted earlier here: https://patchwork.kernel.org/patch/11106611/ Changes from v1: * Introduce pcie_wait_for_link_delay() in a separate patch * Tidy up changelog, remove some debug output * Rename pcie_wait_downstream_accessible() to pci_bridge_wait_for_secondary_bus() and make it generic to all PCI bridges. * Handle Tpvrh + Trhfa for conventional PCI even though we don't do PM for them right now. * Use pci_dbg() instead of dev_dbg(). * Dropped check for pm_suspend_no_platform() and only check for D3cold. * Drop pcie_get_downstream_delay(), same delay applies equally to all devices (it is not entirely clear from the spec). I'm still checking for downstream device because I think we can skip the delays if there is nothing connected. The reason is that if device is added when the downstream/root port is in D3 the delay is handled by pciehp in its board_added(). In case of ACPI hotplug the firmware is supposed to configure the device (and handle the delay). I also checked we do resume sibling devices in paraller (I think due to async_suspend). @Matthias, @Paul and @Nicholas, I appreciate if you could check that this does not cause any issues for your systems. Mika Westerberg (2): PCI: Introduce pcie_wait_for_link_delay() PCI: Add missing link delays required by the PCIe spec drivers/pci/pci-driver.c | 18 +++++++ drivers/pci/pci.c | 113 +++++++++++++++++++++++++++++++++++---- drivers/pci/pci.h | 1 + 3 files changed, 122 insertions(+), 10 deletions(-) -- 2.23.0