From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Trent Piepho <xyzzy@speakeasy.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-pci <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] fakephp: Allocate PCI resources before adding the device
Date: Tue, 25 Nov 2008 23:48:08 -0800 [thread overview]
Message-ID: <20081126074808.GE6539@plum> (raw)
In-Reply-To: <Pine.LNX.4.64.0811251919590.5161@t2.domain.actdsltmp>
[Fixing cc/to list]
On Tue, Nov 25, 2008 at 08:46:37PM -0800, Trent Piepho wrote:
>
> I've had a patch to fakephp that did something like this for a while, but I
> called pci_bus_assign_resources() _after_ adding the devices with calls to
> pci_bus_add_device(). It seems like that might be easier, to just add all
> the devices and then call pci_bus_assign_resources() when done. It appears
> to work fine for me. Is there a reason this is wrong?
afaict, pci_bus_add_devices calls device_add to set up sysfs files and
trigger a event that can (ultimately) cause a pci probe action to
happen... but the probe will fail because the resources aren't ready.
In any case, if a device shows up in sysfs I'd assume that to mean that
the device is ready to go--all the BARs are reserved for the device,
etc. For sure, I woudn't expect to be racing
pci_bus_assign_resources().
--D
next prev parent reply other threads:[~2008-11-26 7:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 21:24 [PATCH] fakephp: Allocate PCI resources before adding the device Darrick J. Wong
2008-11-25 21:43 ` Greg KH
2008-11-26 4:46 ` Trent Piepho
2008-11-26 7:48 ` Darrick J. Wong [this message]
2008-11-26 9:56 ` Trent Piepho
2008-11-26 18:18 ` Darrick J. Wong
2008-11-26 22:23 ` Trent Piepho
2008-11-26 22:55 ` Alex Chiang
2008-11-27 1:44 ` Trent Piepho
2008-11-27 2:42 ` Matthew Wilcox
2008-11-28 10:11 ` Trent Piepho
2008-11-28 18:57 ` Matthew Wilcox
2008-11-28 21:21 ` Trent Piepho
2008-11-28 21:30 ` Matthew Wilcox
2008-12-01 1:10 ` Problems with fakephp Trent Piepho
2008-12-16 20:28 ` fixup PCI device booleans in sysfs Jesse Barnes
2008-11-28 23:18 ` [PATCH] fakephp: Allocate PCI resources before adding the device Alex Chiang
2008-12-01 13:00 ` Problems with fakephp Trent Piepho
2008-12-02 3:16 ` Alex Chiang
2008-12-03 4:07 ` Trent Piepho
2008-12-03 4:38 ` Alex Chiang
2008-12-03 17:22 ` Rolf Eike Beer
2008-12-03 17:43 ` Alex Chiang
2008-12-03 17:55 ` Rolf Eike Beer
2008-12-03 18:22 ` Alex Chiang
2008-12-08 21:09 ` Rolf Eike Beer
2008-12-01 13:36 ` Trent Piepho
2008-12-01 14:08 ` [PATCH] PCI: Method for removing PCI devices Trent Piepho
2008-12-01 14:40 ` Greg KH
2008-12-01 14:08 ` [PATCH] PCI: Legacy fakephp driver Trent Piepho
2008-11-27 1:52 ` [PATCH] fakephp: Allocate PCI resources before adding the device Darrick J. Wong
2008-11-28 9:51 ` Trent Piepho
2008-11-28 18:42 ` Rolf Eike Beer
2008-11-28 21:06 ` Trent Piepho
2008-12-01 17:08 ` Rolf Eike Beer
2008-12-16 19:33 ` Jesse Barnes
2008-12-16 20:56 ` [PATCH] fakephp: Allocate PCI resources before adding the?device Darrick J. Wong
2008-12-21 2:23 ` Trent Piepho
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=20081126074808.GE6539@plum \
--to=djwong@us.ibm.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=xyzzy@speakeasy.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