Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2797778pxk; Sun, 4 Oct 2020 12:26:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFFZ1P/xxHO1B/+K4getvOqiijn7WcQFOi93MoKbmcBbPMut3eXPd8VFGBCUyIl+QHRW+y X-Received: by 2002:a05:6402:396:: with SMTP id o22mr10516555edv.361.1601839584222; Sun, 04 Oct 2020 12:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601839584; cv=none; d=google.com; s=arc-20160816; b=mX7MBPH2/ZqpK4UB2CKPka6wsGWB/AKbdondqRLS/lQX4RLK0MyQX5OMKR2dkMvVov Nls3lqRw8yGp5UPRiPAiL7HJVZ0TPQKtQxCInyeTKFFM8ZgTJFJITksftLCOl9refCLN pZP0oozy/bbIqsvMNj0ln5hHqN7zBZErRmn9kJC6EFQ6RV1XR1Bh+nwCqk//tlxW28gS fvexyPA8Y20JuRo/cbtou0n8Ri/7I13Ud4xUa45csiLwGSVYKCDjf88Jt9TdB3KUhn+q mbCC0NuvDC4pKX4Hisfsfkw0maX38yvH1FMoD3nCMumzOfZpwQGr7u0vy1ZQ81woadyv 9bQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Q1AaYipaT5siwKmh9wUaaITg5kd5NIvu7QewQMq21M8=; b=eG6VlKvmS8VTz3k7/PfGmNHqAIUrXBGtp0XhGjHqeIyWXT8z0m2bIC3fX2td3e9Wri 8lf8/zODgVSsHrb/bST/nBClxq1bQnq5Q1R94Zy/S0jmqMLjNDBT0mG0tymO329eK7Uc OSqkmTWySgSlPfeyg9gW3hrjhI5Zk397csG3Usj+2P0ft8vsKIyyXUmGfjCcZCx6U2GI VEApIF5hkwW4qLwkDYQltVPpiqNr5MDSjLxugBc7OuGENFlgR/eVzLCUdsrG08/o1zN1 1n2suGiXG5mWAyf796TX8E1r+V81VysdKLLki3cfB5G2fe9HHISw8IDOAUlu+kZNp76X dtFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si5246590ejf.257.2020.10.04.12.26.02; Sun, 04 Oct 2020 12:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgJDTWK (ORCPT + 99 others); Sun, 4 Oct 2020 15:22:10 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:40319 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbgJDTWK (ORCPT ); Sun, 4 Oct 2020 15:22:10 -0400 X-Greylist: delayed 516 seconds by postgrey-1.27 at vger.kernel.org; Sun, 04 Oct 2020 15:22:09 EDT Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id A3C61100CF15E; Sun, 4 Oct 2020 21:13:29 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 5E2E1239FE8; Sun, 4 Oct 2020 21:13:29 +0200 (CEST) Date: Sun, 4 Oct 2020 21:13:29 +0200 From: Lukas Wunner To: Ethan Zhao Cc: bhelgaas@google.com, oohall@gmail.com, ruscur@russell.cc, andriy.shevchenko@linux.intel.com, stuart.w.hayes@gmail.com, mr.nuke.me@gmail.com, mika.westerberg@linux.intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@linux.intel.com, sathyanarayanan.kuppuswamy@intel.com, xerces.zhao@gmail.com Subject: Re: [PATCH v7 3/5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC Message-ID: <20201004191329.GA27962@wunner.de> References: <20201003075514.32935-1-haifeng.zhao@intel.com> <20201003075514.32935-4-haifeng.zhao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201003075514.32935-4-haifeng.zhao@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 03, 2020 at 03:55:12AM -0400, Ethan Zhao wrote: > When root port has DPC capability and it is enabled, then triggered by > errors, DPC DLLSC and PDC etc interrupts will be sent to DPC driver, pciehp > drivers almost at the same time. Do the DLLSC and PDC events occur as a result of handling the error or do they occur independently? If the latter, I don't see how we can tell whether the card in the slot is still the same. If the former, holding the hotplug slot's reset_lock and doing something along the lines of pciehp_reset_slot() (or calling it directly) might solve the race. Thanks, Lukas