Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1312175pxk; Fri, 25 Sep 2020 11:20:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUo8kLSNhuFLlLVr7upZdiEZ+jsp1fzIVtldaAU14KKvvYCn7/WRdyd7Doo2VTZdhRexq6 X-Received: by 2002:a17:906:e88:: with SMTP id p8mr4272207ejf.134.1601058054525; Fri, 25 Sep 2020 11:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601058054; cv=none; d=google.com; s=arc-20160816; b=lLtwOwixKkS0rDbryQVzF7kDKCemMoJC1Na7Y9B+rSlHuMG/5JGo5O5Id8+Urk9uEZ qUjyYh01L9GLUdXOTSQIczxYmya0JaLEzem2Fl11jgXhuR0chzAGqrTSAvRITAqBJJTd CeR2Wi8J1fKLPveMUOwQ3aZfMD52rA+DZ6mPrcWJd46Y4ybnwSd5Ab61RwOMo8Up/1MU A0S3i2BuQMQ4EEEVmNrKpihmX0cMOr8lNmxWwQ31aXlOnLl+SDisDRmSzsluB1d8g8wy 5EGrlLPgZfeO7nxqOZei1hanq90GNleBt3z9BxFIVnJ1jY/uG5vJQBrAWKx8qeRi6vl2 1ghw== 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:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=lfRGCZEwUeh34qwGPizi2R9mYbccCDehe6kKhdsfBPc=; b=u9rxTi0YJlfWHvrTNpLSusHo5bWLLbFtyeEC4a+A2eHuH5dJ8NPsmRiARMDRgZ9/G4 M/GbdGZGN/UVRg2qn+hDn4G+7oiom5yvFxeE7dM0vnAJJ6wFgNtxwiaIHFKlo+8x3ZTJ hGQcCQApnvuFqYWAf5N9YywDOM6wSLjD3b4mSTOaCPyrOQUq/VIIaz5RMgavt9wrMFg/ 8aruZhC7xus6f0DTtu2hLrXwoBHs4ZcvD5TJpz9dLJo0Uxo+e/T79mt3cFKOhas68pDI 7MnVt7a0IiiN5MqgXhJZ+tVGHrN+QD2GreV6tuPD/ZNGad/NO8c8ZqPynnTr+om9lGas ZLcg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si2228261ejg.435.2020.09.25.11.20.31; Fri, 25 Sep 2020 11:20:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729739AbgIYSRD (ORCPT + 99 others); Fri, 25 Sep 2020 14:17:03 -0400 Received: from mga05.intel.com ([192.55.52.43]:30408 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728353AbgIYSRC (ORCPT ); Fri, 25 Sep 2020 14:17:02 -0400 IronPort-SDR: D1LUz2e5iEgtd9MY1eYb289kmfTTgVgfWosmIZ3jWTRHvIE4KvLA/ULg88EybpWsqMA8NlfwKJ bc4S2q3/3vgA== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="246385757" X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="246385757" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 11:17:01 -0700 IronPort-SDR: iPxBmzfK6F2DyPoIigBaHYym+cq9qAstU4U4Ztm+Hg0lx4gQzgo25OcEIbiNGvvSxI/W+93Dgb 4XolPQcd0Awg== X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="455947520" Received: from kritigup-mobl.amr.corp.intel.com (HELO [10.255.231.88]) ([10.255.231.88]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 11:16:59 -0700 Subject: Re: [PATCH v3 1/1] PCI/ERR: Fix reset logic in pcie_do_recovery() call To: Sinan Kaya , 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: "Kuppuswamy, Sathyanarayanan" Message-ID: <8beca800-ffb5-c535-6d43-7e750cbf06d0@linux.intel.com> Date: Fri, 25 Sep 2020 11:16:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/25/20 10:47 AM, Sinan Kaya wrote: > 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. Yes. we can add a condition for hotplug capability check. > > 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 Currently DPC is only triggered for FATAL errors. and cause a bus reset > in hardware already before triggering an interrupt. Error recovery is not triggered only DPC driver. AER also uses the same error recovery code. If DPC is not supported, then we still need reset logic. > > 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. > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer