From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96485C5DF63 for ; Wed, 6 Nov 2019 13:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64E152084C for ; Wed, 6 Nov 2019 13:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731237AbfKFNbp (ORCPT ); Wed, 6 Nov 2019 08:31:45 -0500 Received: from mga02.intel.com ([134.134.136.20]:21090 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfKFNbo (ORCPT ); Wed, 6 Nov 2019 08:31:44 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 05:31:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,274,1569308400"; d="scan'208";a="212774039" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga001.fm.intel.com with SMTP; 06 Nov 2019 05:31:38 -0800 Received: by lahna (sSMTP sendmail emulation); Wed, 06 Nov 2019 15:31:37 +0200 Date: Wed, 6 Nov 2019 15:31:37 +0200 From: Mika Westerberg To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Len Brown , Lukas Wunner , Keith Busch , Alex Williamson , Alexandru Gagniuc , Kai-Heng Feng , Paul Menzel , Nicholas Johnson , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] PCI: Add missing link delays required by the PCIe spec Message-ID: <20191106133137.GN2552@lahna.fi.intel.com> References: <20191105125818.GW2552@lahna.fi.intel.com> <20191105200105.GA239884@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105200105.GA239884@google.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 05, 2019 at 02:01:05PM -0600, Bjorn Helgaas wrote: > > I feel that the following is the right place to perform the delay but if > > you think we can ignore the above, I will just do what you say and do it > > in pci_pm_default_resume_early() (and pci_restore_standard_config() for > > runtime path). > > > > [The below diff does not have check for pci_dev->skip_bus_pm because I > > was planning to move it inside pci_bridge_wait_for_secondary_bus() itself.] > > What do you gain by moving it? IIUC we want them to be the same > condition, and if one is in pci_pm_resume_noirq() and another is > inside pci_bridge_wait_for_secondary_bus(), it's hard to see that > they're connected. I'd rather have pci_pm_resume_noirq() check it > once, save the result, and test that result before calling > pci_pm_default_resume_early() and pci_bridge_wait_for_secondary_bus(). Fair enough :)