[lkml]   [2008]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: pci: add to global list before sysfs?
On Fri, 4 Apr 2008 14:01:32 -0700
Greg KH <> wrote:

> What "global list"? You mean the one that I just deleted with my
> patchset that is in -mm and going to be in 2.6.26? :)


> How will changing the addition of the device to the list affect this
> behavior? Do you want to walk the list in your driver's probe function,
> looking for the "subfunction" that is not yet added to the list?

Yes. Things work fine when the driver is loaded after the entire PCI
bus has been scanned, but not when new cards are hotplugged with the
driver already present. I'd like the behaviour to be the same in both

> > Is it possible to do this or will things break left and right if I
> > add them to the global list before I register them with the driver core?
> As I mention above, the "global list" is now gone, so it's going to be a
> bit harder to do this. We now only keep one list of all PCI devices,
> and that is with the driver core mechanisms as the duplicate list was
> just sitting there doing nothing for the past 4 years.

Talk about bad timing...

> So is the problem that your driver need to bind to multiple pci devices
> at the same time in order to work properly?

More or less. Primarily it needs to know which other subfunctions are
there, but in one of the two cases it also needs to fiddle some PCI
config space registers.

> Or is this just really broken hardware?

It is. Deliberately broken in order to work with a certain other broken
operating system.

They have two interfaces for the same piece of hardware, and you need
to make sure you only use one of them or things go south very quickly.
To make things worse, you do not know which of the two will be
available for any given card. Hence the need to scan the bus.

In one of the cases we currently try to disable the secondary
interface, which is done by PCI config space modifications on
subfunction 0.

-- Pierre Ossman

Linux kernel, MMC maintainer
PulseAudio, core developer
rdesktop, core developer

 \ /
  Last update: 2008-04-05 12:01    [W:0.541 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site