Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4140278imm; Mon, 20 Aug 2018 10:29:05 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxjyXRExxahS4WcusDnVAxwDy9DSqUlrFum00jMowAd+FXQFbjhQL9EzOk5HuGNpZ+bEPcM X-Received: by 2002:a65:5784:: with SMTP id b4-v6mr44699137pgr.315.1534786145497; Mon, 20 Aug 2018 10:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534786145; cv=none; d=google.com; s=arc-20160816; b=O/CrC6GB9zS1Qs2gxOXboJt9lGFtXpM9riQDtNACpTfVjPGKdrKHa7J5Ha48pwWUKC CVbQG8DGmHBc9DbPPD2w8N6fF4rEt+Xegk+/GKgd8Jj/mOnNKNzYGTs8/fanVQr0elJ9 rLRWPTb/T3DwTw/H1FYS0qIiuk02m1QiqMn5fS8kZbugcIEsFh9u3fQHHU2QFgJHC27X N81S1N9Ft9ngQqa7AZ6Bsj6QW1Tcxl0Lq7IXxUb9FCc4PHncet3U9OIYp5MOs9BiGO0v JlURCS1QejVcKqGtAP3RS37oF8bGk8ecNQGhg6Ynq5gKXkHHYmbU6rX6/ZwYz1jYSGXL W/tg== 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:dkim-signature :arc-authentication-results; bh=315nCh65CVqHexrzVB/m+t84l7b63HcvghRX/0A5RmY=; b=cxXb9IrBOi/GC6v/2OSnpNkqeDPiQUZVVc2wVAeSi29XDBrrpJsVWu+C9yugcU9U9p +M793Ms0+HgdRMfEJEwMZT6CW9t7y6EihJul2Iw4huHiIfXG4BwtlUBKqNEA4GXpuXRf qw8qfiRTVU0Pd8R8j3u/k6VDwtE1svqd2Rq5/YDu3YEVSHxKKvxvP9sCOXpFpvivjtna 6hYNlDLcNkdove1R1a4HLihbSj1l9xPIoVDJubtWpQdyWMpTF+YCwhquGBUZ8StZFBCc P53A7FytsN0KXlyLINhgUAL9ItdIectruRjdkNCT88loV40QHePvyy1antoCQ14gde5l 3ZPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ml2qO7on; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a24-v6si9837554pgh.357.2018.08.20.10.28.50; Mon, 20 Aug 2018 10:29:05 -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=@kernel.org header.s=default header.b=ml2qO7on; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727302AbeHTUPf (ORCPT + 99 others); Mon, 20 Aug 2018 16:15:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:50222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbeHTUPf (ORCPT ); Mon, 20 Aug 2018 16:15:35 -0400 Received: from [192.168.0.114] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 43B6E21473; Mon, 20 Aug 2018 16:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534784349; bh=PxIEfokOuXhZZtHBGqg/O75RGtpPaNdB+w2/pS8pRGM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ml2qO7onTfVboALy8vuADfiGYWPqX/Sj3L5vHx+TkCysZOmkavh2sYOLbdtuJpHhC FbZdl5bmSTDJIwmqt8Py1WFbWVTnMiMP90EBwXZUTVMPZCFl81xMb8EoINhuxQxtDl cLrq/XnwN7u2xsrv4fd5AFxLwvPyapZSedkloj9I= Subject: Re: [PATCH v8 1/2] PCI: pciehp: Ignore link events when there is a fatal error pending To: Lukas Wunner Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Mika Westerberg , Oza Pawandeep , Keith Busch , open list References: <20180818065126.77912-1-okaya@kernel.org> <20180820092238.kvktwlovc64oa66e@wunner.de> From: Sinan Kaya Message-ID: Date: Mon, 20 Aug 2018 12:59:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180820092238.kvktwlovc64oa66e@wunner.de> Content-Type: text/plain; charset=utf-8; format=flowed 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 8/20/2018 5:22 AM, Lukas Wunner wrote: >> + > This differs from v7 of the patch in that*any* fatal error, not just > a Surprise Link Down, results in pciehp waiting for the error to clear. > > I'm wondering if that's safe: Theoretically, the user might quickly > swap the card in the slot during, say, a Completion Timeout Error, > and with this patch pciehp would carry on as if nothing happened. Functionally both patches are identical. The v7 was still allowing AER/DPC to handle all fatal error events except Surprise Link Down. Now, second patch (v8 2/2) is masking the surprise link down event as we have talked before. Therefore, there is no need to filter out incoming errors by reading the status register and masking the unwanted bits. Just to clarify something, this patch will wait for only the FATAL error events to be handled by the error handling services only. Completion Timeout is a NONFATAL error event by default unless somebody tweaks the severity bits. Anyhow, all FATAL errors cause one sort of link down either initiated by software (AER) or hardware (DPC). Therefore, hotplug driver will observe a link down event and AER/DPC needs to handle the event as usual.