From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Trent Piepho <xyzzy@speakeasy.org>,
"Darrick J. Wong" <djwong@us.ibm.com>,
Alex Chiang <achiang@hp.com>,
"linux-kernel" <linux-kernel@vger.kernel.org>,
"linux-pci" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] fakephp: Allocate PCI resources before adding the device
Date: Tue, 16 Dec 2008 11:33:33 -0800 [thread overview]
Message-ID: <200812161133.33894.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200812011808.31906.eike-kernel@sf-tec.de>
On Monday, December 1, 2008 9:08 am Rolf Eike Beer wrote:
> Trent Piepho wrote:
> > On Fri, 28 Nov 2008, Rolf Eike Beer wrote:
> > > Trent Piepho wrote:
> > > > On Wed, 26 Nov 2008, Darrick J. Wong wrote:
> > > > > On Wed, Nov 26, 2008 at 03:55:35PM -0700, Alex Chiang wrote:
> > > > > > > Maybe it's different on powerpc then? My pseudo-hotplugable
> > > > > > > device is also the only thing connected to the PCI-E host bus
> > > > > > > controller. At boot the controller is empty and so I think some
> > > > > > > code to enable its BARs gets skipped. But without the
> > > > > > > pci_enable_device(), I get this:
> > > > > > >
> > > > > > > 01:00.0 Signal processing controller: Freescale Semiconductor
> > > > > > > Inc Aurora Nexus Trace Interface Flags: fast devsel, IRQ 255
> > > > > > > Memory at 40000000 (64-bit, prefetchable) [disabled] [size=4K]
> > > > >
> > > > > Are you referring to this? ^^^^^^^^^^
> > > > >
> > > > > Without seeing the raw dump of the PCI config space, it looks to me
> > > > > like the memory space enable bit of the PCICMD register is unset.
> > > > > Probably the device driver should call pci_enable_device() at init
> > > > > time, though I suppose you did say earlier that there is no driver.
> > > >
> > > > Yes, that's it. It seems like since the BARs are normally enabled
> > > > after a device is scanned at boot time that they should also be
> > > > enabled when a device is found by a fakephp rescan. So I thought it
> > > > seemed reasonable to put pci_enable_device() in fakephp.
> > >
> > > No, pci_enable_device() will be called by the device driver. The
> > > hotplug drivers have nothing to do with that.
> >
> > I guess you didn't read the part about there not being a device driver?
>
> I read it, but that's the way a kernel works: if you want to talk to a
> device, get a driver. You can write a rather minimal one that does only
> pci_enable_device() on probe and pci_disable_device() on remove. Try the
> one posted by Chris Wright in "[PATCH 2/2] PCI: pci-stub module to reserve
> pci device" as a starting point.
Ok, so sounds like Darrick's original patch gets a NAK? I guess the fakephp
vs. dummyphp vs. new interface stuff can be dealt with in another thread...
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2008-12-16 19:35 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
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 [this message]
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=200812161133.33894.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=achiang@hp.com \
--cc=djwong@us.ibm.com \
--cc=eike-kernel@sf-tec.de \
--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 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.