Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp15585pxk; Tue, 22 Sep 2020 17:04:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtrwkbj8LrCO9p1RGqPtIPFon+3s3csDPqSE1NOK82FEfg4lntvPZJ55+4Bgyjr/wHctb/ X-Received: by 2002:a17:906:3e08:: with SMTP id k8mr7487984eji.480.1600819484719; Tue, 22 Sep 2020 17:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600819484; cv=none; d=google.com; s=arc-20160816; b=CxstAvHDuEvziC+JfDR6knItWdFqabP4ZZPSA0nA8yIQwiDUMPnMkaY0UWtaHLh4LN RavuGn4im9ui8+NzkwyVaILSsvTpGx32NWMitPqng6o3UKMzeHhRNemO1q9AqYQ46CG7 5RrV1HV5YuwfY+Q/rQ/nlJrh9BfRU854m8/fmfN21h6UH+yGYTWU68OOG5i/Mbim6535 wmWkxewzpt0anERuVY7iqzDUTYVlNLc7YIwE0LK1bdxK8DehwXijO/5HKluNVWIJqwgp 8SENcozHdr1EmzWRgCQBmKOB6dJa+HM2qew5reekJQGzgODEicer7od/t7cleoXYMnqF nvWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=nUASdGfnljxft+tQoX1HerMb0Hks7iCvz/j5/qt0nLk=; b=OBTproV03VMZEYHLWC3a8Z+P1/Qs2mPCb94KgtZRowZyA5dqsVtdW5Qvfg1oSy1W4d SjQXmypIrcpQHLEEoWFDPOeEztUg5pLn/fPnSCAloOzTs+iFvUJgQQqyM5d0mUe9ziOB 1IUmpvEoSvUZ855b5WKOCCBMQq7OdeFo7VbOSES/AKKx+zz+qgHpDl4yVnVOHeuLFYAw 11PlkVPMWLOjR5IU+99mQygNL51zFrnhCRI0Wq8qtZ7pQegzRIyyUx9i9VFFc0F66uES 9RBGFPemOy6M0OWtdijWgONo/rid5OZ2beRzStH6sTFekhANThfKFBBBjAr1Db/sBBpj oLsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dX4p+3KS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si11543450ejz.749.2020.09.22.17.04.21; Tue, 22 Sep 2020 17:04:44 -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; dkim=pass header.i=@kernel.org header.s=default header.b=dX4p+3KS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgIVXdg (ORCPT + 99 others); Tue, 22 Sep 2020 19:33:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgIVXdf (ORCPT ); Tue, 22 Sep 2020 19:33:35 -0400 Received: from localhost (52.sub-72-107-123.myvzw.com [72.107.123.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE4C922206; Tue, 22 Sep 2020 23:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600817615; bh=jwF9DOzeIZ5gGIZT8xl2A5S/glutG512fwYCGqAjLAk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=dX4p+3KSf39qcG29Ew5bgrb0FLVmXwGaUPhTipxz7INAEOdIUTvJEXVGsxPRyfBo3 ymW7sh8mrhapZHjGzoHvyJEUmrKICTqSGFentiRtvUkWNTcXH9NUcYpkVw1iLdwrQt VW4ys9et354HHvptLSQHmaRegGTb01GqyzL9ex4k= Date: Tue, 22 Sep 2020 18:33:33 -0500 From: Bjorn Helgaas To: "Kuppuswamy, Sathyanarayanan" Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, Jay Vosburgh Subject: Re: [PATCH v3 1/1] PCI/ERR: Fix reset logic in pcie_do_recovery() call Message-ID: <20200922233333.GA2239404@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cad1a07-509b-ef51-f635-71def2ff8293@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 02:44:51PM -0700, Kuppuswamy, Sathyanarayanan wrote: > > > On 9/22/20 11:52 AM, Bjorn Helgaas wrote: > > On Fri, Jul 24, 2020 at 12:07:55PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote: > > > From: Kuppuswamy Sathyanarayanan > > > > > > Current pcie_do_recovery() implementation has following two issues: > > > > > > > I'm having trouble parsing this out, probably just lack of my > > understanding... > > > > > 1. Fatal (DPC) error recovery is currently broken for non-hotplug > > > capable devices. Current fatal error recovery implementation relies > > > on PCIe hotplug (pciehp) handler for detaching and re-enumerating > > > the affected devices/drivers. pciehp handler listens for DLLSC state > > > changes and handles device/driver detachment on DLLSC_LINK_DOWN event > > > and re-enumeration on DLLSC_LINK_UP event. So when dealing with > > > non-hotplug capable devices, recovery code does not restore the state > > > of the affected devices correctly. > > > > Apparently in the hotplug case, something *does* restore the state of > > affected devices? > > Yes, in hotplug case, DLLSC state change handler takes over detachment > /cleanup and re-attachment of affected devices/drivers. Where does the restore happen here? I.e., what function does this?