public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Sinan Kaya <okaya@codeaurora.org>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Maik Broemme <mbroemme@libmpq.org>,
	Pawandeep Oza <poza@codeaurora.org>
Subject: Re: [PATCH 4/4] PCI/DPC: Print AER status in DPC event handling
Date: Tue, 16 Jan 2018 18:34:34 -0700	[thread overview]
Message-ID: <20180117013434.GC6259@localhost.localdomain> (raw)
In-Reply-To: <20180117005559.GF10860@bhelgaas-glaptop.roam.corp.google.com>

On Tue, Jan 16, 2018 at 06:56:00PM -0600, Bjorn Helgaas wrote:
> On Mon, Jan 15, 2018 at 07:47:41PM -0700, Keith Busch wrote:
> > On Wed, Jan 10, 2018 at 10:52:23AM -0500, Sinan Kaya wrote:
> > > Since the AER status is set when we observe DPC event and nobody
> > > is clearing these we won't observe another DPC event until
> > > somebody clears these. We can say that we are resetting the
> > > endpoints as part of the DPC but we are not touching the switch
> > > downstream port or the root port registers.
> > > 
> > > Somebody still needs to clear these in addition to printing
> > > whatever information is available in the AER registers.
> > 
> > We should clear the downstream port's AER uncorrectable status
> > register if the trigger reason is of that type, but DPC definitely
> > does not require we clear it in order to observe a new event.
> 
> I don't quite understand this.  We don't need to clear the AER status
> in order to observe a new DPC event, but I think we *do* need to clear
> the AER status in order to log future AER events.  Don't we?

Absolutely, I totally agree on this. I have a v2 ready to send that calls
pci_cleanup_aer_uncorrect_error_status after printing the error. And
I've also made sure to do this only for the appropriate trigger reason
that you mentioned on the other thread.

> I think Sinan is saying that if a DPC Port observes its own unmasked
> uncorrectable error (i.e., not something it learned about by receiving
> an ERR_* message), it will set a bit in an AER status register.
> 
> Since we do not set DPC ERR_COR Enable, the DPC Port does not generate
> an ERR_COR Message, so the AER driver never learns about the error and
> never clears the AER status register.  So we'll decode the AER status
> (with your current patch), but we don't clear it, so if another error
> occurs, the AER logging won't work correctly.
> 
> Maybe we should be setting DPC ERR_COR Enable and letting the AER
> driver decode and clear the AER info?

Yes, enabling ERR_COR should be no problem and will provide those
platform notification benefits.

That alone will not clear the uncorrectable status, though. The AER
driver will only check correctable status registers on that message. The
spec doesn't appear to define what we should find in the downstream
port's correctable status, so I can't tell if that will actually log
new information or if it's simply to assist platform notification that
something happened.

I'll post the v2 for consideration, and inlcude the ERR_COR enabling. This
does clash a bit with Oza's approach, but it should lower churn for the
near term.

  reply	other threads:[~2018-01-17  1:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 21:06 [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Keith Busch
2017-12-19 21:06 ` [PATCH 2/4] PCI/AER: Provide API for getting AER information Keith Busch
2017-12-19 21:06 ` [PATCH 3/4] PCI/DPC: Enable DPC in conjuction with AER Keith Busch
2018-01-15 14:43   ` Sinan Kaya
2018-01-16  1:33     ` Keith Busch
2018-01-16  3:04       ` Sinan Kaya
2017-12-19 21:06 ` [PATCH 4/4] PCI/DPC: Print AER status in DPC event handling Keith Busch
2017-12-21  4:43   ` Sinan Kaya
2017-12-21  5:12     ` Keith Busch
2018-01-10 15:52       ` Sinan Kaya
2018-01-16  2:47         ` Keith Busch
2018-01-17  0:56           ` Bjorn Helgaas
2018-01-17  1:34             ` Keith Busch [this message]
2018-01-17 13:36             ` Sinan Kaya
2018-01-12 23:03   ` Bjorn Helgaas
2018-01-14  1:35     ` Keith Busch
2018-01-15 14:32       ` Sinan Kaya
2018-01-17  0:36         ` Bjorn Helgaas
2018-01-17  0:14       ` Bjorn Helgaas
2017-12-21  1:04 ` [PATCH 1/4] PCI/AER: Return approrpiate value when AER is not supported Bjorn Helgaas
2017-12-21  3:53   ` Dongdong Liu
2017-12-21 14:59   ` Keith Busch
2018-03-20 23:02 ` Bjorn Helgaas
2018-03-21 22:27   ` Keith Busch

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=20180117013434.GC6259@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mbroemme@libmpq.org \
    --cc=okaya@codeaurora.org \
    --cc=poza@codeaurora.org \
    /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