From: Greg KH <greg@kroah.com>
To: Jan Dittmer <jdittmer@ppp0.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Is there a user space pci rescan method?
Date: Thu, 23 Sep 2004 16:31:47 -0700 [thread overview]
Message-ID: <20040923233147.GK14868@kroah.com> (raw)
In-Reply-To: <4152E606.3070609@ppp0.net>
On Thu, Sep 23, 2004 at 05:04:38PM +0200, Jan Dittmer wrote:
> Greg KH wrote:
> > On Thu, Sep 23, 2004 at 01:58:32AM +0200, Jan Dittmer wrote:
> >
> >>Dave Aubin wrote:
> >>
> >>>Hi,
> >>>
> >>> I know very little about hotplug, but does make sense.
> >>>How do you motivate a hotplug insertion event? Or should
> >>>I just go read the /docs on hotplugging? Any help is
> >>>Appreciated:)
> >>
> >>There is a "fake" hotplug driver which works for normal pci. But last
> >>time I looked at it, it did only support hot disabling, not hot enabling
> >>- but this surely can be fixed.
> >
> >
> > Yes, hot "enabling" has been left for someone to add to the driver, if
> > you read the comments in it :)
> >
>
> I read them and started playing around with this driver. So echoing 0 in
> /sys/bus/pci/slots/*/power disables the pci device. The problem I see
> is, that the tree with the device is disappearing. So how am I supposed
> to re-enable the device.
You need to add another sysfs file called "rescan" or something.
Writing to that file will cause the kernel to rescan pci space, and add
any devices it finds that are not already present. The code to do that
can be taken from the pci startup code in the kernel today.
> I've no real hotplug hardware to play with, so I'm bound to reading
> the source code in drivers/pci/hotplug and testing with fakephp.
That's fine. You don't need real hotplug pci hardware to use fakephp,
that's what the driver is for :)
> I found your utility pcihpview (v0.5) which searches for
> /sys/bus/pci/hotplug_slots. But grepping the kernel tree doesn't show
> any mentioning of it - so I suppose it is outdated.
That's a 2.4 interface. I need to get a new version of that program out
there that works for 2.6 one of these days (the bk version of the
program has this support already in it, if you want to mess with
that...)
> Is there anywhere a current article (or Documentation/pci_hotplug.txt)
> about the state of PCI hotplug and how this is supposed to work?
Not really, sorry.
> ps: Meanwhile I found dummyphp on the pcihpd mailinglist. This doesn't
> remove the device from /sys/bus/pci/slots/*/power . Still I'd like
> to know the offical way.
That's the driver that I based fakephp on. It's a good starting point
for what it sounds like you want to do.
Hope this helps,
greg k-h
next prev parent reply other threads:[~2004-09-24 0:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-22 22:00 Is there a user space pci rescan method? Dave Aubin
2004-09-22 23:58 ` Jan Dittmer
2004-09-23 0:26 ` Greg KH
2004-09-23 15:04 ` Jan Dittmer
2004-09-23 16:49 ` Rolf Eike Beer
2004-09-23 16:53 ` Jan Dittmer
2004-09-23 17:05 ` Rolf Eike Beer
2004-09-24 10:41 ` Rolf Eike Beer
2004-09-24 11:42 ` Jan Dittmer
2004-09-24 12:12 ` Rolf Eike Beer
2004-09-24 12:16 ` Jan Dittmer
2004-09-24 12:32 ` Rolf Eike Beer
2004-09-24 14:55 ` Greg KH
2004-09-27 9:14 ` Rolf Eike Beer
2004-10-10 0:13 ` Jan Dittmer
2004-10-10 0:59 ` Jan Dittmer
2004-10-10 13:45 ` Jan Dittmer
2004-10-30 4:16 ` Greg KH
2004-10-31 23:59 ` [patch 1/2] fakephp: introduce pci_bus_add_device Jan Dittmer
2004-11-01 9:35 ` Christoph Hellwig
2004-11-02 22:51 ` Jan Dittmer
2004-11-11 23:47 ` Greg KH
2004-11-12 0:13 ` Jan Dittmer
2004-11-12 18:59 ` Greg KH
2004-10-31 23:59 ` [patch 2/2] fakephp: add pci bus rescan ability Jan Dittmer
2004-11-12 18:59 ` Greg KH
2004-09-24 13:09 ` [Pcihpd-discuss] Re: Is there a user space pci rescan method? Matthew Wilcox
2004-09-24 13:18 ` Rolf Eike Beer
2004-09-24 12:40 ` Jan Dittmer
2004-09-24 12:59 ` Rolf Eike Beer
2004-09-23 23:31 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-09-22 21:58 Dave Aubin
2004-09-22 20:30 Dave Aubin
2004-09-22 20:04 ` Alan Cox
2004-09-22 20:42 ` Richard B. Johnson
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=20040923233147.GK14868@kroah.com \
--to=greg@kroah.com \
--cc=jdittmer@ppp0.net \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.