Received: by 10.213.65.68 with SMTP id h4csp1241326imn; Wed, 14 Mar 2018 14:02:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELuxYb6Qqd2v/FNuFkAqKpCeuJIBGqu2J5hCxI7umgr1dCx5PsU+bObEavXd91lDqUix4A+l X-Received: by 2002:a17:902:bf44:: with SMTP id u4-v6mr5379394pls.68.1521061328676; Wed, 14 Mar 2018 14:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521061328; cv=none; d=google.com; s=arc-20160816; b=Fj6Xm44L2KFXSLXLm8mfE53l3vzrg6GoMpmtR9FX65ZTCGtZJVP2DDl11dRDhaz/mC iC/TKVYfp7X250rZ6mJA+3FxgPQmESYl+T9OowMqmd+twqUUhXUU1b8OdxN1E6wV5y/e UuhRtMy1a3nkZDamHqNwD3Z5epWiZoLxASjjhpHIeF7ENH4BP6MVNsoF8UHplBp881Ea qp2cSipwNKvYfnB3xh8PJ39QYhZCig1g+yI3PdIr44PbdT/pqfYVxQJO7Bijj9/cmg7a oC3Wb+sZN1qqWB0hkzIQa1besxJHkX7PtyfGcqrnPs/q4Q9oFCmJXD09RTnaY8g1czr2 9V+Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=SYBKs2m2TUPuJbCLCokC8dFHBKuqNeFATkKQWgAI+8M=; b=Ku7CGyPjZTW282A1tq6aKXVVFdjoJqflz1uvtSYc1EEQesDC4NXKGS7UDHLyN+2dzX uC5/dK4ELCwi9F3Dk8zW8LB+4AtOUCnBLjiLR4/bNzn/2AAO6jmh9umoViBNS+TnqZeD uQBXa8ZKFIXkLjCIpd1ToOqWsV1LgWV1NMFw1sUceWYqY2hJl53MnQ8hZz7qYubiFeZ3 1tAW++CwNdx9M317fWmABcNq8AkehIu51kznNMHWvzigjbfbOq/ywSWVWyknHa7ekh22 jq2zBGV8E52j43p9DT0hHaN6zDHqIoKEduTsnasjJb6Dpz/SuftTzqdISG1BIJGuZC6P vQ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ObZl8Uwz; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ql5fXiYi; 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 c2si2371392pgp.611.2018.03.14.14.01.53; Wed, 14 Mar 2018 14:02:08 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=ObZl8Uwz; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ql5fXiYi; 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 S932227AbeCNVAX (ORCPT + 99 others); Wed, 14 Mar 2018 17:00:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44328 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbeCNVAV (ORCPT ); Wed, 14 Mar 2018 17:00:21 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 34A5160AF9; Wed, 14 Mar 2018 21:00:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521061221; bh=TpAmD/MFwC0j3mlQslGi8hX/DixNS6bnve1qilKlOjI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ObZl8UwzA+C+kHv/j4GoICXM3sfr/S3QWh/s3zlQfAdi8AoTIkDqtxUbUbXNWGf4X HlWZpLUa/WDbGuL8on1Z32tJAZeygexujJMN5QxRslKg0ik6DUAYk3WHkfdVV9wsBL egsbH+JviwCky7xWGToKbD9GyUiDASYSaJNWg9ug= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C4EB960591; Wed, 14 Mar 2018 21:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521061220; bh=TpAmD/MFwC0j3mlQslGi8hX/DixNS6bnve1qilKlOjI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Ql5fXiYitTL6nI+MMKro0XGYTBsW/HpTfNwONyRO0y8SNVxzEXzkF7Xzv4KpKP6C7 W/2JtCYC7pY2QW4IDQ+zK4CMsLH6vf6TZOCSP7u0g2Oj4YwIxAGvAVOhqaBsy4cXAN eoKmOheRhsKgdZ/TvlV17ZLD1TgiEiXNeGx1v8mM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C4EB960591 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH v12 0/6] Address error and recovery for AER and DPC To: Keith Busch 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 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> <20180314205049.GE29867@localhost.localdomain> From: Sinan Kaya Message-ID: <8553ab27-b805-b995-068b-09857b875967@codeaurora.org> Date: Wed, 14 Mar 2018 17:00:17 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180314205049.GE29867@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/14/2018 4:50 PM, Keith Busch wrote: > 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. > Yes, we can go with "Hotplug Capable". > 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. > OK. To simplify our life, we can check if hotplug service is attached to this device or not and follow two different paths. We can get rid of re-enumeration and stop devices for the non-hotplug case and make it behave exactly like AER. Bjorn, will that work for you? -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.