From: Linas Vepstas <linas@austin.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to find hotplug slot of PCI dev?
Date: Wed, 29 Jun 2005 23:00:19 +0000 [thread overview]
Message-ID: <20050629230019.GP28499@austin.ibm.com> (raw)
On Wed, Jun 29, 2005 at 03:44:38PM -0700, Greg KH was heard to remark:
> On Wed, Jun 29, 2005 at 05:05:08PM -0500, Linas Vepstas wrote:
> >
> > Hi,
> >
> > I can't think of any easy way of (generically) finding the pointer to
> > struct hotplug_slot if I have a pointer to struct pci_dev in hand.
>
> There is no way, sorry. Remember, multiple pci_dev can point to a
> single hotplug slot.
Right. I have I pointer to a pci_dev. I want to find the pointer to the
hotplug slot its in.
> > I am sorely tempted to write a generic patch to
> > drivers/pci/hotplug/pci_hotplug_core.c to add this support
> > (getting it from each of the hotplug arch'es). Should I?
> > If I submit sucha patch, would it get rejected out of hand
> > as a bad idea?
> >
> > I need this for the generic fallback PCI error recovery support;
>
> Why?
I don't understand the question...
Because after discussions on the LKML, everyone decided that this
code should be written in as generic a way as possible, rather
than arch-dependent, because there will soon be a variety of PCI
chipsets that will be able to detect PCI errors.
> > I have a pointer to the device; if its in a hotplug slot,
> > I want to toggle power to it.
>
> No you do not. That's a userspace policy, not something the kernel
> should do.
Argh. I thought we've run around the table a few times on this issue
already. It is impossible for userspace to recover from PCI errors.
The canonical example is the failure of a disk system underneath a block
device.
All other bus errors are handled in the device drivers; for example,
scsi errors are handled by scsi drivers and/or scsi-generic code.
fiber-channel errors are handled by the fiber channel controllers.
Ethernet hangs are handled by ethernet watchdogs in each ethernet
driver. I think its unrealistic at this point to try to turn PCI
error recovery into a userspace policy.
--linas
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2005-06-29 23:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 23:00 Linas Vepstas [this message]
2005-06-29 23:26 ` How to find hotplug slot of PCI dev? Greg KH
2005-06-30 0:14 ` Linas Vepstas
2005-06-30 0:36 ` Greg KH
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=20050629230019.GP28499@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=linux-hotplug@vger.kernel.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).