kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: PCI error handlers in Linux
Date: Tue, 16 Sep 2014 11:15:39 -0700	[thread overview]
Message-ID: <20140916181539.GA24456@kroah.com> (raw)
In-Reply-To: <CANybWhoYA3vziXav7NuhK6USEX2ucnEdmTTjM5DeS9FgcbXxaA@mail.gmail.com>

On Wed, Sep 17, 2014 at 02:04:04AM +0800, Alvin Abitria wrote:
> Hello,
> 
> In my pci driver for a certain pci device, I implemented the pci error
> handler functions (error_detected, slot_reset methods, etc).  I want
> to trigger a pci error for me to exercise those handlers and observe
> its behavior.  I've read from the pci error recovery kernel
> documentation that the 1st step is with error_detected method, called
> by the system if it detected any error related to the pci device.  The
> good thing is that the system will detect it for the driver,
> simplifying things.  But I'm having problems with error detection
> itself.
> 
> I tried to trigger the error via the PCI device.  On its FW, I
> triggered a reset of its PCI subsystem.  As a result, the I/O rate
> dropped to zero and the driver now can't send to the device.
> Something indeed happened in their PCI connection.  However, I
> couldn't see my error_detected method being called, when I was
> expecting the kernel will detect the PCI error and call the handler.
> Instead, some warning message appeared in the console as follows:
> 
> irq 16: nobody cared
> handlers:
> ...
> ...
> Disabling IRQ # 16
> 
> What baffles me more is that the injected PCI error seemed to brought
> down that IRQ 16 device as well - which is definitely not the irq # of
> my driver/device.  Any thoughts on why the kernel did not detect that
> PCI error?  Is there anything I could possibly missed during
> registration of error handler methods?
> 
> If that is so, I'd like to ask for other means of injecting PCI
> errors, in order for me to exercise my error handlers.  Thanks!

You might want to ask this on the linux-pci at vger.kernel.org mailing list
instead.  The developers there can help you out better than the people
here can.

Hope this helps,

greg k-h

      reply	other threads:[~2014-09-16 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 18:04 PCI error handlers in Linux Alvin Abitria
2014-09-16 18:15 ` Greg KH [this message]

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=20140916181539.GA24456@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).