Received: by 10.192.165.156 with SMTP id m28csp2198713imm; Thu, 12 Apr 2018 10:09:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IMYRYUh3svK18OIuz+UgIjDrlwdREP3veKbZ0QmoAzm1MEtL7eb7ze51OGYGzwMjUU1Dw X-Received: by 10.101.82.4 with SMTP id o4mr1290807pgp.273.1523552981891; Thu, 12 Apr 2018 10:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523552981; cv=none; d=google.com; s=arc-20160816; b=FcomCHAuWWvHzYTIOnaTwwEIl/UUXdbbzB4+sVY+ZmmhnTpu34cNL5qtiVlFzuw3/R /wzQs4tWZG4selwSCNqMfpOzP10ByurXl3V/R840LGu29J78svUONvyPriT3NNzofFb/ eLeud00zvAfArJGowZFX+34t241ryh+pB5P69Nzq8HytYE/i8kW3bC+WSZJviJnMbENo 5EGhhYPsFCuRJm6uUF9KIRkYhBwTuqtXMl8FrdmWLM8Zc/ud/7ZFmOq2947YtIGJq/vq DfoiR9Iz6Zptou/npQT7wKpSwPMtqWY5v2JiLP6LrlXECo0i/I4FgdiITQjFgP/wQ+Cf GFcg== 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=t6PPDYvh+qaEIitujjlmqdED/SamEQLM3hBWiIl1kpE=; b=rOv2yXzhxGNvR5JNnpD0AOQcV3BUc6PTPRlm17MDTZzW1xbvUmMUNN+wwVkyCpBWrT Li/Zyt7kBUo7rZDzbUOwXdae7DyzTLY2jHMtdlMMNuU0TinJTiTgg7+ncIew2ub06lJJ ro3gWY9MewYZr/vLwfcbQrZumqyJSghdKWj6JmbVy9SVej/Idv+5FYPl9uLMdd+asggj vdIoNYhuwYhQ3Ez1pzO08oJFoD1uNhU1YktP1KANgnN6T8H6gWlsnwQfD0J28xuM3NUH BxfV22Wfe6/4Vz0fsT6Y9Q2ttxkf04oKXFPcbPHnOQ0sI23fgmSOwlt4dOH87pgvUiwo DJXA== 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 3-v6si3659875plx.589.2018.04.12.10.09.27; Thu, 12 Apr 2018 10:09:41 -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 S1752783AbeDLRIR (ORCPT + 99 others); Thu, 12 Apr 2018 13:08:17 -0400 Received: from mga12.intel.com ([192.55.52.136]:17949 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406AbeDLRIQ (ORCPT ); Thu, 12 Apr 2018 13:08:16 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 10:08:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,442,1517904000"; d="scan'208";a="32911493" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga007.jf.intel.com with ESMTP; 12 Apr 2018 10:08:13 -0700 Date: Thu, 12 Apr 2018 11:09:11 -0600 From: Keith Busch To: Sinan Kaya Cc: Bjorn Helgaas , Oza Pawandeep , Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Wei Zhang , Timur Tabi , Alex Williamson Subject: Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system Message-ID: <20180412170911.GA6424@localhost.localdomain> References: <1523284914-2037-1-git-send-email-poza@codeaurora.org> <1523284914-2037-7-git-send-email-poza@codeaurora.org> <20180410210349.GG54986@bhelgaas-glaptop.roam.corp.google.com> <13efe2e8-74c8-acb4-ec58-f79b14a1f182@codeaurora.org> <20180412140648.GD145698@bhelgaas-glaptop.roam.corp.google.com> <20180412143954.GB4810@localhost.localdomain> <20180412150231.GD4810@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 12:27:20PM -0400, Sinan Kaya wrote: > On 4/12/2018 11:02 AM, Keith Busch wrote: > > > > Also, I thought the plan was to keep hotplug and non-hotplug the same, > > except for the very end: if not a hotplug bridge, initiate the rescan > > automatically after releasing from containment, otherwise let pciehp > > handle it when the link reactivates. > > > > Hmm... > > AER driver doesn't do stop and rescan approach for fatal errors. AER driver > makes an error callback followed by secondary bus reset and finally driver > the resume callback on the endpoint only if link recovery is successful. > Otherwise, AER driver bails out with recovery unsuccessful message. I'm not sure if that's necessarily true. People have reported AER handling triggers PCIe hotplug events, and creates some interesting race conditions: https://marc.info/?l=linux-pci&m=152336615707640&w=2 https://www.spinics.net/lists/linux-pci/msg70614.html > Why do we need an additional rescan in the DPC driver if the link is up > and driver resumes operation? I thought the plan was to have DPC always go through the removal path to ensure all devices are properly configured when containment is released. In order to reconfigure those, you'll need to initiate the rescan from somewhere.