Received: by 10.213.65.68 with SMTP id h4csp1235647imn; Wed, 14 Mar 2018 13:50:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELvuWsYNK4dw6dxWLLbnn9N4JZHwyCUNfNAQSfuV+4iy6eWX2zPtnsaxBfjNdc56/IXkV5kg X-Received: by 10.99.7.76 with SMTP id 73mr4903677pgh.349.1521060617599; Wed, 14 Mar 2018 13:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521060617; cv=none; d=google.com; s=arc-20160816; b=P1KanxtcUtoeW5urPDgopZJqSOxPDQPTyVVLq7ZziADRpscKv695d3XLlWmFYzK7q1 js2mbYXiNPY74QRIPXKeIMy/8qZfOeAud+DSAZbfxlvHai3YTZSlmRLxhRPmGXjvoZDZ EPpj/1TNwBUNB+jWV7pSHGAbUNe3AvD/w/ZrHyui1qf1LSuM7IH5PMG5ZfQ1IvcyqzXb P+996qbJTSws4y0F12Xt4OoG79VAMhldqy5jjOtjMceIDmkBZKshcXG2XXAtDfrLPCw8 bU4eiKys+mggFdjCHobNYiNobdKbUnWWWXxpxLvRMg6rOfpY5YyYRg1U9qB9OGRXwKBq pyQQ== 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=u57EOfjGbql1nGc9HBsGwlIiZG/+nsnS50fmAuKbYVg=; b=ruuDfKCjINJeYFfDT/uAQsT6DC4pJWLsF20zUsRvO/kU9J/y36gMeVPlku0er85hto QdPQ2EnB5CzhimHZD9m7owjqdttNLVAUJsA8ZruFgEoZhTWDE0/hzMunChDWOCzkqzhX F6rcGTJCgrEgcmYqbDl/XB3VbOTy6tG0tXiU3Ol0bwYZgeCoklOW6X+8o0ampH5xeyDR ajZJWmr+XJ+Y7T/Pzp7fVYIlVtGYgkxYwuM02C1Nhq/d2nJJwvHNOKkoE6AkERK3GhAb M6oVpgmzlNZLLIbk++9fw8BGH98XKuEo2JWnoQWH6JpYpkCVS1ajS24lJBSSObkA8iUO bgfA== 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 e63si2648697pfb.268.2018.03.14.13.50.02; Wed, 14 Mar 2018 13:50:17 -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 S1751727AbeCNUs4 (ORCPT + 99 others); Wed, 14 Mar 2018 16:48:56 -0400 Received: from mga04.intel.com ([192.55.52.120]:35798 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbeCNUsz (ORCPT ); Wed, 14 Mar 2018 16:48:55 -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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 13:48:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,307,1517904000"; d="scan'208";a="24714782" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga007.jf.intel.com with ESMTP; 14 Mar 2018 13:48:50 -0700 Date: Wed, 14 Mar 2018 14:50:50 -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 v12 0/6] Address error and recovery for AER and DPC Message-ID: <20180314205049.GE29867@localhost.localdomain> References: <1519837457-3596-1-git-send-email-poza@codeaurora.org> <20180311220337.GA194000@bhelgaas-glaptop.roam.corp.google.com> <04ade52e-d1ea-fe67-bb26-246621d159e6@codeaurora.org> <20180312142551.GB18494@localhost.localdomain> <20180312194236.GA12195@bhelgaas-glaptop.roam.corp.google.com> <20180312232626.GI18494@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 Mon, Mar 12, 2018 at 11:47:12PM -0400, Sinan Kaya wrote: > > The spec is recommending code to use "Hotplug Surprise" to differentiate > these two cases we are looking for. > > The use case Keith is looking for is for hotplug support. > The case I and Oza are more interested is for error handling on platforms > with no hotplug support. > > According to the spec, if "Hotplug Surprise" is set in slot capabilities, > then hotplug driver handles link up and DPC driver doesn't interfere with > its operation. Hotplug driver observes link up interrupt like it is doing today. > When link up event is observed, hotplug driver will do the enumeration. > > If "Hotplug Surprise" bit is not set, it is the job of the DPC driver to > bring up the link. I believe this path should follow the AER driver path > as there is a very well defined error reporting and recovery framework > in the code. > > The link comes back up automatically when DPC driver handles its interrupt > very similar to what secondary bus reset does for AER. I don't believe > there is a hotplug possibility under this condition since it is not supported > to begin with. > > Should we plumb the "Hotplug Surprise" condition into the code to satisfy > both cases and leave the error handling path according to this code series? I'm on board with this, but I think you mean "Hotplug Capable" rather than "Hotplug Surprise". The former may co-exist with DPC and handles the link-ups, leaving DPC responsible for handling the link-down. The "Hotplug Surprise" capability is recommended to not co-exist with DPC since that capability may suppress the "surprise link down" notification that DPC needs to see in order to trigger. If the "Hotplug Capable" bit is not set, detecting the link-up after a DPC event would have to fall under a different component's responsibility, so I think I'm finally seeing your point.