linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	bhelgaas@google.com, alex_gagniuc@dellteam.com,
	austin_bolen@dell.com, shyam_iyer@dell.com,
	Dongdong Liu <liudongdong3@huawei.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: DPC: Clear AER status bits before disabling port containment
Date: Wed, 16 May 2018 17:12:21 -0600	[thread overview]
Message-ID: <20180516231220.GA21659@localhost.localdomain> (raw)
In-Reply-To: <605540c0-b6c5-89a2-9d50-12a3005d9f88@codeaurora.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 <mr.nuke.me@gmail.com>
> > ---
> >  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.

  reply	other threads:[~2018-05-16 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 21:33 [PATCH] PCI: DPC: Clear AER status bits before disabling port containment Alexandru Gagniuc
2018-05-16 22:44 ` Sinan Kaya
2018-05-16 23:12   ` Keith Busch [this message]
2018-06-19 21:57     ` Bjorn Helgaas
2018-06-26 20:51       ` Alex G.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180516231220.GA21659@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=alex_gagniuc@dellteam.com \
    --cc=austin_bolen@dell.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=mr.nuke.me@gmail.com \
    --cc=okaya@codeaurora.org \
    --cc=shyam_iyer@dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).