linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duc Dang <dhdang@apm.com>
To: Bjorn Helgaas <helgaas@kernel.org>, linux-pci@vger.kernel.org
Cc: patches <patches@apm.com>
Subject: PCI: aer: AER correctable status register may be cleared before the aer_isr workqueue inspects it
Date: Fri, 11 Nov 2016 18:38:40 -0800	[thread overview]
Message-ID: <CADaLNDmq_RY89=FUkM7q98ukUq5_zOn8iAF70Jm_U-4RwtDc1Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

Hi Bjorn and All,

I ran into this error message when testing with my X-Gene Mustang board (on
kernel 4.9-rc1):
pcieport 0002:00:00.0: AER: Corrected error received: id=0000
pcieport 0002:00:00.0: can't find device of ID0000

Looking into aer_isr() code, in case of handling correctable AER event,
handle_error_source() will be called and it will clear Correctable Error
Status Register of the device that reports AER event. This operation may
end up clearing the status bit of the new (and same type) correctable AER
event that happen when this aer_isr worker thread is still running; and
cause the next aer_isr worker thread find no error status bit get set, so
it prints out the above warning messages.

I can see a possible solution is we cache all AER status registers of both
the root port and all of its end-point devices inside interrupt handler
(aer_irq) and pass these information to the aer_isr worker thread. But it
seems an expensive operation to be done in interrupt context and I am not
sure if you've already encountered and thought about this issue before?

Regards,
Duc Dang.

[-- Attachment #2: Type: text/html, Size: 1344 bytes --]

             reply	other threads:[~2016-11-12  2:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12  2:38 Duc Dang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-12  2:49 PCI: aer: AER correctable status register may be cleared before the aer_isr workqueue inspects it Duc Dang

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='CADaLNDmq_RY89=FUkM7q98ukUq5_zOn8iAF70Jm_U-4RwtDc1Q@mail.gmail.com' \
    --to=dhdang@apm.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=patches@apm.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).