Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp537486imm; Wed, 25 Jul 2018 01:30:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcKfYu83bzjPTf14Vb/LAkqzR4oYYvCg9U+NIEAdfi8NiMUX1duPvchDCXVBRtLDNtUb1Gl X-Received: by 2002:a63:5421:: with SMTP id i33-v6mr19803824pgb.417.1532507422947; Wed, 25 Jul 2018 01:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532507422; cv=none; d=google.com; s=arc-20160816; b=q5w8jhEeMgTVPWTVOwGWA4z/5PVz84gYn+Nf78+NFRWfJshifv921++RbYi/lK0kO2 SrGI0EPwtzqYxtnKF/0267uRGqd+pU00wKBorK3kiQnR1nfd+NhbsHGD8sSE9shAx+At xrR7iKFGnXB2qacvc/JocWhi06lZnQKbal7SWcVCp62nX4Pq7/Km9EoHHxa7ExPhZmoW ndaBQu8pPonmBecLnNhtEd4baJXv45x7lzTwdfmRfsMMDdhFUTQx93gl5/28IJyYy3nL Ia0vRy+weh4PT51lPyAdhqDk4558PmEyqHJPauqYv0cjnJ3zxCPBgJnFQ/CNyazAZBX6 oE9A== 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=73zxzDRWEqSyltYo3YwsdAyZCXlm2kUHVbEljeGpbBg=; b=SK/v9Iw16mnMB+ahDi1HROh70dT0m4Y8y52b0K5tFmZpfSaP67K+QnZQFJeAZGhJG0 1WQn583GbXvo7g0NJCkcOM1PknwLe4G+ApohaOy+PDyzfW+UMzp6oHSDiXV10h/fy+ky go/Mc0WuTpp4ugVdl5JQHt25kql/zftHowiV0p5GwOHICRLZC3dF8fdDroaSqxu6ZZyh 5iON5PI1dbX6m9Sw2EAalDgbaRLiqN2FZaHV3kYhEZnDNd24Rg+f6X4Mkyt9uIPt4Y5g FfTJrZemBjFWXkqietBYEoNRaYJ2rA3n9tNWiXvwZCNcbyKDQfA5MN6xaROhMq1bzRhS FjFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HVDo6XPo; dkim=pass header.i=@codeaurora.org header.s=default header.b=HVDo6XPo; 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 a1-v6si13584312pga.639.2018.07.25.01.30.08; Wed, 25 Jul 2018 01:30:22 -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=HVDo6XPo; dkim=pass header.i=@codeaurora.org header.s=default header.b=HVDo6XPo; 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 S1728714AbeGYJjy (ORCPT + 99 others); Wed, 25 Jul 2018 05:39:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46658 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728222AbeGYJjx (ORCPT ); Wed, 25 Jul 2018 05:39:53 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E12C760B73; Wed, 25 Jul 2018 08:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532507356; bh=nvdbsYkc5fMIMw//dqUzmWMoBMax6XztzkUA4pXVuFs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HVDo6XPoatOZZJgJQXblZR4/B4OC/A4cZ4W2aLHRFebcR+94OhJWXjypM2vLTBKku zBidV3yKX/vbjnHU3r718VLZPH90+XKlTTyYTX3zebWzU5lduhuyHu68NvmLLytcKD 27yVE5odhnuGCxSHeEnF0UDnu5c0DaGZB35r99/w= 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 6275960B19; Wed, 25 Jul 2018 08:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532507356; bh=nvdbsYkc5fMIMw//dqUzmWMoBMax6XztzkUA4pXVuFs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HVDo6XPoatOZZJgJQXblZR4/B4OC/A4cZ4W2aLHRFebcR+94OhJWXjypM2vLTBKku zBidV3yKX/vbjnHU3r718VLZPH90+XKlTTyYTX3zebWzU5lduhuyHu68NvmLLytcKD 27yVE5odhnuGCxSHeEnF0UDnu5c0DaGZB35r99/w= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 25 Jul 2018 13:59:16 +0530 From: poza@codeaurora.org To: Sinan Kaya Cc: Bjorn Helgaas , Lukas Wunner , linux-pci@vger.kernel.org, open list , Keith Busch , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V5 3/3] PCI: Mask and unmask hotplug interrupts during reset In-Reply-To: References: <12fc8de5-ff03-cb00-52cb-25a43c71d03a@codeaurora.org> <20180708171418.GA11476@wunner.de> <20180709160008.GA1490@wunner.de> <20180720200123.GS128988@bhelgaas-glaptop.roam.corp.google.com> <2febe688-f973-5ff5-f61d-0451ad7d36ae@kernel.org> Message-ID: <5cdaf58f3c848b2a5097484cd703acae@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-07-21 11:37, Sinan Kaya wrote: > On 7/20/2018 7:58 PM, Sinan Kaya wrote: >> We need to figure out how to gracefully return inside hotplug driver >> if link down happened and there is an error pending. > > How about adding the following into the hotplug ISR? > > 1. check if firmware first is disabled > 2. check if there is a fatal error pending in the device_status > register > of the PCI Express capability on the root port. > 3. bail out from hotplug routine if this is the case. > 4. otherwise, existing behavior. This makes sense. from Lukas's text " The user may turn the slot on/off via sysfs. If an Attention Button is present, the user may also press that button to turn the slot on/off after 5 seconds. Either way, it may cause pciehp's IRQ thread to run concurrently to a reset initiated by the AER driver, independently of any events signalled by the slot. " so if device gets removed and re-enumerated other than hotplug ISR, or any other similar path has to take care of checking ERR_FATAL status. Regards, Oza.