Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1289873pxk; Fri, 25 Sep 2020 10:49:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhlDVC2knOnENYsKpPhvbJs4DA0+Enu9D4CQ8TpDlFLftWYG0lQRC2mDMgMU2oUWBmlDXO X-Received: by 2002:aa7:ce15:: with SMTP id d21mr2568552edv.284.1601056164418; Fri, 25 Sep 2020 10:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601056164; cv=none; d=google.com; s=arc-20160816; b=tjh9U6YVS3WfvK0yiel5Fj7K6dDkiFCMJIcAfKmXNTUjKe6Ia2NT3NoAeowEnfuAkp frXZPB5rMFZI58MnbSxVBHSvMsJViYOO6EKtm9FhRnQ3251XxA5eAueRcQcmuRFiVyuk tVdH2yRrEkDQOV3sJz57+FN+SmOsUtvqbCTpZuDdkkdu9Y4nNYRYp9YRMZC8aMyqRsNc xBT6dNDkQ7XE1vm6GCxocptJOZgGvOAWw18NOTGI3k2a7xBzZntf+ZN8IbGiuU0UDNBc UaRZNiUkMhvVNs+miJu1+fESFHf8ViNAQuDK0GUP3QIHoLrzsEhMnHFRXeP7o8VFjU5h M3yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=zdZv9Z8tskjplrJSb7CqrkFqUhrNUE84Hm0tFfNiXb0=; b=XLH/OGnHW7IHeR3rBd4b2Rqldm6d0kzBUouAfPCj40ChzH7INRPs4OkBYiIXvPkmuY LKSW2e2iOh7XAv6Uo5yEVkVZOqc4Aet/o8duD/Sx8lcRN66EM1b7lRxuNiQyhWRbr1qJ y9hdWTA7YSVndSOIG5CbcwOSDszROJc0bdOwueeHoRZDKgNieDqMX8vpUVESmS73Mw+l bGjQyu3QltPfhOpjBzRZu0BcGuEq4eVeTbwQk12GUP7SjPkil/T0B1UAXMedo/VhPZ9E PZqudO4arp5fJcl8xCHASoWkKRglMlI/OWteUcITMANG5kBwk+hmQFSnt71ppZSP0Nct XjXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pvW6pFgc; 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 s10si2228924ejr.574.2020.09.25.10.48.59; Fri, 25 Sep 2020 10:49: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; dkim=pass header.i=@kernel.org header.s=default header.b=pvW6pFgc; 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 S1728038AbgIYRro (ORCPT + 99 others); Fri, 25 Sep 2020 13:47:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:48580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgIYRro (ORCPT ); Fri, 25 Sep 2020 13:47:44 -0400 Received: from [192.168.0.112] (75-58-59-55.lightspeed.rlghnc.sbcglobal.net [75.58.59.55]) (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 B4DA9221EC; Fri, 25 Sep 2020 17:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601056063; bh=zdZv9Z8tskjplrJSb7CqrkFqUhrNUE84Hm0tFfNiXb0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pvW6pFgcr8z9SV/vaK9grVj8BQgtUjinM8Iy0F5ceW8YkLL1M1SCov70+SuMB+Wt1 1Lul9hFX0cRtmG8W5fwgPQrLA94UFZLXZUD98fhr2ulser3UqGc6Daa7P5yO+Ep9ok fLECAHuMU5TIRyN0kpDifBT44vEz+jP1xHQ531iY= Subject: Re: [PATCH v3 1/1] PCI/ERR: Fix reset logic in pcie_do_recovery() call To: "Kuppuswamy, Sathyanarayanan" , Bjorn Helgaas Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, Jay Vosburgh References: <20200922233333.GA2239404@bjorn-Precision-5520> <704c39bf-6f0c-bba3-70b8-91de6a445e43@linux.intel.com> <3d27d0a4-2115-fa72-8990-a84910e4215f@kernel.org> <526dc846-b12b-3523-4995-966eb972ceb7@kernel.org> <1fdcc4a6-53b7-2b5f-8496-f0f09405f561@linux.intel.com> <95e23cb5-f6e1-b121-0de8-a2066d507d9c@linux.intel.com> <65238d0b-0a39-400a-3a18-4f68eb554538@kernel.org> <4ae86061-2182-bcf1-ebd7-485acf2d47b9@linux.intel.com> From: Sinan Kaya Autocrypt: addr=okaya@kernel.org; keydata= mQENBFrnOrUBCADGOL0kF21B6ogpOkuYvz6bUjO7NU99PKhXx1MfK/AzK+SFgxJF7dMluoF6 uT47bU7zb7HqACH6itTgSSiJeSoq86jYoq5s4JOyaj0/18Hf3/YBah7AOuwk6LtV3EftQIhw 9vXqCnBwP/nID6PQ685zl3vH68yzF6FVNwbDagxUz/gMiQh7scHvVCjiqkJ+qu/36JgtTYYw 8lGWRcto6gr0eTF8Wd8f81wspmUHGsFdN/xPsZPKMw6/on9oOj3AidcR3P9EdLY4qQyjvcNC V9cL9b5I/Ud9ghPwW4QkM7uhYqQDyh3SwgEFudc+/RsDuxjVlg9CFnGhS0nPXR89SaQZABEB AA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eXpJw+Rz+vKjSt1YIhg46YbdZrDM2FGrt9ve3YaM5H0lzJgq/JQPKFdbd5MB0X37Qc+ 2m/A9u9SFnOovA42DgXUyC2cSbIJdPWOK9PnzfXqF3sX9Aol2eLUmQuLpThJtq5EHu6FzJ7Y L+s0nPaNMKwv/Xhhm6Y= Message-ID: Date: Fri, 25 Sep 2020 13:47:41 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <4ae86061-2182-bcf1-ebd7-485acf2d47b9@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/25/2020 1:11 PM, Kuppuswamy, Sathyanarayanan wrote: >> Why? Isn't DPC slot reset enough? > It will do the reset at hardware level. But driver state is not > cleaned up. So doing bus reset will restore both driver and > hardware states. I really don't like this. If hotplug driver is restoring the state and DPC driver is not; let's fix the DPC driver rather than causing two resets and hope for the best. One approach is to share the restore code between hotplug driver and DPC driver. If this is a too involved change, DPC driver should restore state when hotplug is not supported. DPC driver should be self-sufficient by itself. > Also for non-fatal errors, if reset is requested then we still need > some kind of bus reset call here. DPC should handle both fatal and non-fatal cases and cause a bus reset in hardware already before triggering an interrupt. I disagree that you need an additional reset on top of DPC reset. Isn't one reset enough? What will the second reset provide that first reset won't provide? I see that you are trying to do the second reset only because second reset restores state. That looks like a short-term fix only to explode on the next iteration.