Received: by 10.223.185.116 with SMTP id b49csp120982wrg; Mon, 19 Feb 2018 18:13:29 -0800 (PST) X-Google-Smtp-Source: AH8x226GU3X/ahwqysasA7BN0lAcp+7vmzPpynW2g96rxK+ztDk3igE5xMApT/1NMgQDkhlj9Dwh X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr15912966pld.210.1519092809658; Mon, 19 Feb 2018 18:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519092809; cv=none; d=google.com; s=arc-20160816; b=imc5vEbXmpH8E+VrK6QPwHo/4J5mJihdQQiXRTprcB4t1acitZZnNZKCgu5vNVLQq0 nz0QGM2HlDFDUxBe3FPAUaeVihQhaejpVEAXhmNHAZmunpRjZm1blq3PbsWN6y2uiePZ QCBSiZLaFtPX9h+S0CDME9JkUhDAcTwxDheVG05+GrI9k5dDEj48yRqgYto0ZQjheYA6 guiuwDqA6T5Or3zHOfVn3IOyFrg6EkYxnpqMzF0mJ5JJwLOJHsM2t24rJNt7IUwfxgMb hz+j7gs0JOMXelXn3/Y8ufpRp9Nmr0uU2/wVgUFuWLxiWzcLhq4+an1I8wejWOMjjo77 sq7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+XeD+CvSG7EvIrEEkCxzGa2cOU1WXbCiInId20aTr6s=; b=hfZPa/nwawnLG8AI+lGp5Z0SvatZZWSM5vpIeNEe3fwZfQM+BJyoaN4cSiDomeyVbK wpMSGh+dpiUzdi6sW1NVk7aDtAPWvZa2Z7agFuf2OFmU9zBXavTrSfmZeUzrgMfM2elw XayJkmvwsU6S6ATHslI6OiobjVV+oW1xDRQFzoKUW6vz/4OBRLHplE1PP0bv3DQr3MWw BYao+BYq1CLneqqQw+2stpk2flZmUn57a0YC/4cy7nOl5ZH00clEVnfZaQh3LS/sWiQY ZekERZ/ieTOyLDejqkPRvkJ7OL+ONMjKAhgBktWpe/beCQFXg1o8F6SkBQfF++BzG6xU SJaA== 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 p3si3100033pff.257.2018.02.19.18.13.03; Mon, 19 Feb 2018 18:13:29 -0800 (PST) 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 S932344AbeBTByg (ORCPT + 99 others); Mon, 19 Feb 2018 20:54:36 -0500 Received: from bmailout1.hostsharing.net ([83.223.95.100]:55553 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932294AbeBTByf (ORCPT ); Mon, 19 Feb 2018 20:54:35 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 479D2300002A5; Tue, 20 Feb 2018 02:54:33 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1D85638EF8; Tue, 20 Feb 2018 02:54:33 +0100 (CET) Date: Tue, 20 Feb 2018 02:54:33 +0100 From: Lukas Wunner To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Mika Westerberg , George Cherian , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, Jayachandran.Nair@cavium.com, Robert.Richter@cavium.com, Lorenzo Pieralisi Subject: Re: [PATCH] PCI: Add quirk for Cavium Thunder-X2 PCIe erratum #173 Message-ID: <20180220015433.GA9656@wunner.de> References: <1517554846-16703-1-git-send-email-george.cherian@cavium.com> <2323301.ORZpb3hFRe@aspire.rjw.lan> <20180216203434.GC11014@bhelgaas-glaptop.roam.corp.google.com> <2858019.9TUCWsDpTB@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2858019.9TUCWsDpTB@aspire.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 12:21:56PM +0100, Rafael J. Wysocki wrote: > On Friday, February 16, 2018 9:34:34 PM CET Bjorn Helgaas wrote: > > On Fri, Feb 16, 2018 at 01:40:37PM +0100, Rafael J. Wysocki wrote: > > > On Friday, February 16, 2018 12:39:00 AM CET Bjorn Helgaas wrote: > > > > On Thu, Feb 15, 2018 at 10:57:25PM +0100, Rafael J. Wysocki wrote: > > > > > On Wednesday, February 14, 2018 9:16:53 PM CET Bjorn Helgaas wrote: > > > > > > I don't know how this runtime PM works, but maybe Rafael can help > > > > > > us out. This has nothing to do with runtime PM AFAICS. The device seems to be in D3hot on boot, is that correct? The PCI core assumes that unbound devices remain in D0 (see comments in pci_pm_runtime_resume() / pci_pm_runtime_suspend()). > > > > > I'm not sure what the question is to be honest. > > > > > > > > My questions are basically "What does the PCI core need to do to make > > > > sure a device is in D0 before it operates on it? And where do we need > > > > to do that?" When scanning the bus and discovering the device is not in D0, call pci_power_up(). This could probably go into pci_init_pm(). Once a driver binds to it, it may choose to runtime suspend it to D3hot again. Just an idea anyway. Thanks, Lukas