2004-01-29 23:11:39

by Jake Moilanen

[permalink] [raw]
Subject: Re: Fw: [PATCH][2.6] PCI Scan all functions

On Tue, 2004-01-27 at 18:09, Linus Torvalds wrote:
> On Tue, 27 Jan 2004, Jake Moilanen wrote:
> >
> > I tried this patch on my one (and only) machine that exibits this
> > issue. Everything was detected correctly.
>
> Ok. This at least looks more palatable in that it's now confined a bit
> better.
>
> However, looking at the logic, we really only want to do the
> "pcibios_scan_all_fns()" once per device, not once for each function, no?
>
> Linus

Here's a patch that addresses Linus's concerns. Andrew, if you have no
objections, please apply.

Thanks,
Jake



Attachments:
linux-2.6.1-pcibios-scan-all-fns-3.patch (10.48 kB)

2004-01-29 23:29:38

by Andrew Morton

[permalink] [raw]
Subject: Re: Fw: [PATCH][2.6] PCI Scan all functions

Jake Moilanen <[email protected]> wrote:
>
> On Tue, 2004-01-27 at 18:09, Linus Torvalds wrote:
> > On Tue, 27 Jan 2004, Jake Moilanen wrote:
> > >
> > > I tried this patch on my one (and only) machine that exibits this
> > > issue. Everything was detected correctly.
> >
> > Ok. This at least looks more palatable in that it's now confined a bit
> > better.
> >
> > However, looking at the logic, we really only want to do the
> > "pcibios_scan_all_fns()" once per device, not once for each function, no?
> >
> > Linus
>
> Here's a patch that addresses Linus's concerns. Andrew, if you have no
> objections, please apply.

Could you please send me a changelog description for this patch? A bit of
background for posterity, so other kernel developers can come in a year
hence and answer the question "what's all this about then?". Thanks.

2004-01-30 14:11:02

by Jake Moilanen

[permalink] [raw]
Subject: Re: Fw: [PATCH][2.6] PCI Scan all functions

> Could you please send me a changelog description for this patch? A bit of
> background for posterity, so other kernel developers can come in a year
> hence and answer the question "what's all this about then?". Thanks.

Sure.

On a ppc64 logically partitioned system, there can be a setup where
function 0 of a PCI-PCI bridge is assigned to one partition and
(for example) function 2 is assigned to a second partition. On the
second partition, it would appear that function 0 does not exist, but
function 2 does. If all the functions are not scanned, everything under
function 2 would not be detected.

This patch allows devices that don't respond to function 0, but do
respond to other functions to be marked with a quirk and have all of
their functions scanned.

Thanks,
Jake