Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2609462imm; Wed, 16 May 2018 16:11:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrFFmGBwGw5uJDnIA09cDDD4gzwNPoRWxw8CXxgW35HvEnHIaGC2dktUSJ2dh+7KmL7mYQ9 X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr2731095plb.37.1526512279433; Wed, 16 May 2018 16:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526512279; cv=none; d=google.com; s=arc-20160816; b=KlCKtf5r3qTJGz7nihwx/WyhoOJKJO228afHXF7baOv6PWAT5u6Cq49An/BscPgI0c ia/J3B7IFlfgpoQVVSbYuwNhA0+tWlnT9pmscSVz64LJSNL33JHKzmTH1zShPFicSv49 /n4j8JYASeBreiGzxiAraDuUmFo0IV/c8fU12lMzmISW+bDW5MVU+g/i9Hn3EQ1oD4nN qx3yYMUQ1PRwP1tjz0Ul5CSsTRD6DcoqmHbsZt1w5H5wNAM3y/38oW0TONMkWMw+Yr5L MAgY0sbs6PgZeW7Nw+rIMDjg8Cwdmq51atONtuoDOCmcQwIIPFnE+goDAfocF9G30te/ Ys8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=AeNQ+yhAMp1507ElC+rAAzkVETqzRp2sHBjseCsWJKc=; b=tTWVMDWVf2zg4JnOMOfagbm0sTkGGlW0omcIu44/a0gyKNpBmBsiqm+iKAeWrcJkxR 5YqC8qfA0UFCQspe9lVUW+CaHUkZJcNxVl5YU5wn20RCpAxvNxwTusHmeIbPxyXQVqJW Lc5JRlmxuB3tj69ujp09MTeUQRJkANZEFiF9W6zF59luSSLHNkXZwsVBKWLABm/tlZuE EMT7mw/JEjJSCeyxIH3g5qvedes6098XOrXRxgrRFcLxaP93tnM0svX97CuT6xLz5HZI K9QmIrySVklCGF4csi08KTQrez+1wSxiXEmXUnlTrliZhlLtDmxX7xAc74gQBpxN/UtY t0cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si3604488plm.134.2018.05.16.16.10.29; Wed, 16 May 2018 16:11:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1751395AbeEPXKX (ORCPT + 99 others); Wed, 16 May 2018 19:10:23 -0400 Received: from mga01.intel.com ([192.55.52.88]:4149 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbeEPXKW (ORCPT ); Wed, 16 May 2018 19:10:22 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 16:10:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,408,1520924400"; d="scan'208";a="59269551" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga002.jf.intel.com with ESMTP; 16 May 2018 16:10:20 -0700 Date: Wed, 16 May 2018 17:12:21 -0600 From: Keith Busch To: Sinan Kaya Cc: Alexandru Gagniuc , bhelgaas@google.com, alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Dongdong Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: DPC: Clear AER status bits before disabling port containment Message-ID: <20180516231220.GA21659@localhost.localdomain> References: <20180516213306.27027-1-mr.nuke.me@gmail.com> <605540c0-b6c5-89a2-9d50-12a3005d9f88@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <605540c0-b6c5-89a2-9d50-12a3005d9f88@codeaurora.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 06:44:22PM -0400, Sinan Kaya wrote: > On 5/16/2018 5:33 PM, Alexandru Gagniuc wrote: > > AER status bits are sticky, and they survive system resets. Downstream > > devices are usually taken care of after re-enumerating the downstream > > busses, as the AER bits are cleared during probe(). > > > > However, nothing clears the bits of the port which contained the > > error. These sticky bits may leave some BIOSes to think that something > > bad happened, and print ominous messages on next boot. To prevent this, > > tidy up the AER status bits before releasing containment. > > > > Signed-off-by: Alexandru Gagniuc > > --- > > drivers/pci/pcie/dpc.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c > > index 8c57d607e603..bf82d6936556 100644 > > --- a/drivers/pci/pcie/dpc.c > > +++ b/drivers/pci/pcie/dpc.c > > @@ -112,6 +112,10 @@ static void dpc_work(struct work_struct *work) > > dpc->rp_pio_status = 0; > > } > > > > + /* DPC event made a mess of our AER status bits. Clean them up. */ > > + pci_cleanup_aer_error_status_regs(pdev); > > + /* TODO: Should we also use aer_print_error to log the event? */ > > + > > pci_write_config_word(pdev, cap + PCI_EXP_DPC_STATUS, > > PCI_EXP_DPC_STATUS_TRIGGER | PCI_EXP_DPC_STATUS_INTERRUPT); > > > > > > I think Keith has a patch to fix this. It was under review at some point. Right, I do intend to following up on this, but I've had some trouble finding time the last few weeks. Sorry about that, things will clear up for me shortly.