Received: by 10.213.65.68 with SMTP id h4csp94760imn; Mon, 12 Mar 2018 07:48:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELuuYg1kKWdN1gvcDurs6MCk4MZcypYIRB6OVzw8KEz0ujypY0Q/3yvdl6sf3u6pRgUU/6BM X-Received: by 2002:a17:902:b288:: with SMTP id u8-v6mr4327259plr.339.1520866086425; Mon, 12 Mar 2018 07:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520866086; cv=none; d=google.com; s=arc-20160816; b=XTMqNauZSmbKTz+rKLsAmwYVt5/bcGVwqZ6kfjxxOSIb+z7+FdZ9y7AKSFu2Lb1VDP ZKkAnr1/et+K8lDaRl75nNuX5R4rqoULvCRnR84ZzVLdJMd22/ZfD0bLCdzUIBn1CPvC kxk1J5R62uaSuOhRBa+fzv9hI0Do8s6KxOsr0GEYR2F4mlTUtW1K67S6lqCi05Ic+9nt zbHBL/enrVGYVBqDt/4LYAaBZphg3bjIwYXMiyILfU9RNRhHh/RnZyAdzOAkoTtYfEQN bIFp30norXSOdRygOenzQQ1cekJVkfSCyCu0BFVkX7A+bjWiQxrAz/SsFmmjJYc8wWXg BuVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=zp0bwhjZzzCN+MPPtpE9dhnbnBgL6g/zXr7ZdJvKhx4=; b=EIevXI2NS2sYqLwFNqgKToeWoB1SKYBAzpfmRJtim4wozxvMoyHJP3cYEjAEVaWG9G 58r5Jni+5p2GeOXNcSlKZMro2ti/7vMvB1oPFHzaX8zbmc1E7d1KT6o2lQe3fDx+Bvf6 plOhtxbSaKkrf1o84eKdz1a8cndJ3dux48k/+ll+pIPMOj0oglq9DJ0ohZ5SFxLWK0Dm OGpItJVQRli5iwxHYG+JkQJBoS2G1bOIXnv7jpFKoYzRoeFQIu4wy3bJxgCoMUSI0o/C 69ejPiRQ5qIjyvGeoTnPSqQLw8kbrQInWnyr2KzqeVnQ0ySUjf+09DNj3dbQteyO9ISe SL1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ekROUzHJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=hBAFzDQ6; 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 h10si5117264pgf.326.2018.03.12.07.47.51; Mon, 12 Mar 2018 07:48:06 -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=ekROUzHJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=hBAFzDQ6; 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 S1751991AbeCLOqx (ORCPT + 99 others); Mon, 12 Mar 2018 10:46:53 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35174 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbeCLOqk (ORCPT ); Mon, 12 Mar 2018 10:46:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 85C926083C; Mon, 12 Mar 2018 14:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520865999; bh=RCYU6iF0PlbYZWNeIvSXMBjlazBSTsaIdoO96C4WfKU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ekROUzHJlcJPcnpvQuCqToMVD7ZfZH/d+l7TWAsdve62DEYlYGAv+NHoz0rgtj22b 5Cq64LUZSQeA36DGGHDk34r9GBRzlcelq75fBzXHbPkn4fOUkG5QBbJMcuF+iBlsQb UiHviz8SAojiJUJBkZ1qn/N5T/B1oIVeJ5LuMoRs= 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 mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 8084E601D2; Mon, 12 Mar 2018 14:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520865998; bh=RCYU6iF0PlbYZWNeIvSXMBjlazBSTsaIdoO96C4WfKU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hBAFzDQ6yGVuHIGOjqKprYKUrXQtswElqQMRV8YxPMHUYYffj3PStTSe84+/k4L+1 IBDD7wnb1jiAKuExBbY2CmxwLRqKvgQ15ooef37hGZLgrZbvk8yNi7xLrbSFv5SlgP 8jO44+jjQHgRVi4gs2LCfUzfqUR2Bmztp/9Newc8= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 12 Mar 2018 20:16:38 +0530 From: poza@codeaurora.org To: Keith Busch Cc: Sinan Kaya , Bjorn Helgaas , 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 , linux-pci-owner@vger.kernel.org Subject: Re: [PATCH v12 0/6] Address error and recovery for AER and DPC In-Reply-To: <20180312142551.GB18494@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> Message-ID: <3e1a2036675de6b8456145a022640f3d@codeaurora.org> X-Sender: poza@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-12 19:55, Keith Busch wrote: > On Sun, Mar 11, 2018 at 11:03:58PM -0400, Sinan Kaya wrote: >> On 3/11/2018 6:03 PM, Bjorn Helgaas wrote: >> > On Wed, Feb 28, 2018 at 10:34:11PM +0530, Oza Pawandeep wrote: >> >> > That difference has been there since the beginning of DPC, so it has >> > nothing to do with *this* series EXCEPT for the fact that it really >> > complicates the logic you're adding to reset_link() and >> > broadcast_error_message(). >> > >> > We ought to be able to simplify that somehow because the only real >> > difference between AER and DPC should be that DPC automatically >> > disables the link and AER does it in software. >> >> I agree this should be possible. Code execution path should be almost >> identical to fatal error case. >> >> Is there any reason why you went to stop driver path, Keith? > > The fact is the link is truly down during a DPC event. When the link > is enabled again, you don't know at that point if the device(s) on the > other side have changed. Calling a driver's error handler for the wrong > device in an unknown state may have undefined results. Enumerating the > slot from scratch should be safe, and will assign resources, tune bus > settings, and bind to the matching driver. > > Per spec, DPC is the recommended way for handling surprise removal > events and even recommends DPC capable slots *not* set 'Surprise' > in Slot Capabilities so that removals are always handled by DPC. This > service driver was developed with that use in mind. Now it begs the question, that after DPC trigger should we enumerate the devices, ? or error handling callbacks, followed by stop devices followed by enumeration ? or error handling callbacks, followed by enumeration ? (no stop devices) Regards, Oza.