From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 523E6C77B73 for ; Fri, 21 Apr 2023 02:30:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233237AbjDUCa5 (ORCPT ); Thu, 20 Apr 2023 22:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbjDUCay (ORCPT ); Thu, 20 Apr 2023 22:30:54 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A8D2680; Thu, 20 Apr 2023 19:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682044253; x=1713580253; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=lXmb3JKMQYphwt/h/vLhy2biJxC/A3UU1XVEqedzQEc=; b=Ibdf87UTT57mwRLYE9PRvoufavJsyCZtiZRphTpzCDcgdHdbmtejbWVd Sp30EfDuaOZBHHi1iWt7jX6qHZet6+9BLT3XXNdurj3059fCestLKVsRZ F0Lx7VvnF/yeRN5uuxFkVddTONF9ieyt3rQ1kr2EjavdBKnr0peyILhVc MkvaLeUmZ3qwx7kTId4+EBSM+o+MFRW3kaka95bX2IjOPcOXak+MOCUou HM+L39dDEKYWNJaQQ2XwAoZSn6iS6blSO+Y1Rrq74Y6dS85+UBobI+vIC glNqgdrCAKHbru/1OqIkYJOlnoKOQcIjB0lZuhUAmirFGC2ZP6v9gVK+F Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="408836761" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="408836761" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 19:30:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="866546785" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="866546785" Received: from bgroza-mobl.amr.corp.intel.com (HELO [10.212.168.100]) ([10.212.168.100]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 19:30:51 -0700 Message-ID: Date: Thu, 20 Apr 2023 19:30:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH v3 1/4] PCI: Keep AER status in pci_restore_state() Content-Language: en-US To: Kai-Heng Feng Cc: bhelgaas@google.com, mika.westerberg@linux.intel.com, koba.ko@canonical.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230420125941.333675-1-kai.heng.feng@canonical.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/20/23 6:35 PM, Kai-Heng Feng wrote: > Hi Sathyanarayanan, > > On Thu, Apr 20, 2023 at 10:39 PM Sathyanarayanan Kuppuswamy > wrote: >> >> Hi Kai, > > It's Kai-Heng :) > >> >> On 4/20/23 5:59 AM, Kai-Heng Feng wrote: >>> When AER is using the same IRQ as PME, AER interrupt is treated as a >>> wakeup event and it can disrupt system suspend process. >>> >>> If that happens, the system will report it's woken up by PME IRQ without >>> indicating any AER error since AER status is cleared on resume. >>> >>> So keep the AER status so users can know the system is woken up by AER >>> instead of PME. >>> >>> Reviewed-by: Mika Westerberg >>> Signed-off-by: Kai-Heng Feng >>> --- >> >> Any history on why it is cleared before? Is it done to hide some resume >> issues? > > It was introduced by commit b07461a8e45b ("PCI/AER: Clear error status > registers during enumeration and restore"). > The justification is quite reasonable so I think maybe we should keep it as is. Yes. It looks like it is better to leave it as it is. > > Kai-Heng > >> >>> v3: >>> - No change. >>> >>> v2: >>> - New patch. >>> >>> drivers/pci/pci.c | 1 - >>> 1 file changed, 1 deletion(-) >>> >>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c >>> index 7a67611dc5f4..71aead00fc20 100644 >>> --- a/drivers/pci/pci.c >>> +++ b/drivers/pci/pci.c >>> @@ -1778,7 +1778,6 @@ void pci_restore_state(struct pci_dev *dev) >>> pci_restore_dpc_state(dev); >>> pci_restore_ptm_state(dev); >>> >>> - pci_aer_clear_status(dev); >>> pci_restore_aer_state(dev); >>> >>> pci_restore_config_space(dev); >> >> -- >> Sathyanarayanan Kuppuswamy >> Linux Kernel Developer -- Sathyanarayanan Kuppuswamy Linux Kernel Developer