lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812011808.31906.eike-kernel@sf-tec.de>
Date:	Mon, 1 Dec 2008 18:08:30 +0100
From:	Rolf Eike Beer <eike-kernel@...tec.de>
To:	Trent Piepho <xyzzy@...akeasy.org>
Cc:	"Darrick J. Wong" <djwong@...ibm.com>,
	Alex Chiang <achiang@...com>,
	"linux-kernel" <linux-kernel@...r.kernel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	"linux-pci" <linux-pci@...r.kernel.org>
Subject: Re: [PATCH] fakephp: Allocate PCI resources before adding the	device

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.

Eike

Download attachment "signature.asc " of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ