Re: [patch 3/7] Check root chipset no_msi flag instead of all parent busses flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grant Grundler wrote:
> On Wed, Jul 05, 2006 at 12:38:27AM -0400, Brice Goglin wrote:
>   
>> Grant Grundler wrote:
>>     
>>> I still don't want the generic PCI code to assume a "root"
>>> PCI Host bus controller was found after that loop.
>>>       
>> If I am not mistaken, we can use the following code to check whether we
>> found a root chipset:
>>         unsigned cap;
>>         u16 val;
>>         u8 ext_type;
>>         cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
>>     
>
> That might work fine on x86 boxen where firmware fakes all devices
> to show up in PCI config space. That's not the case on many other
> architectures. My whole point was the pdev doesn't exist for
> a root chipset on those other arch's.
>   

Right, and the whole point of this check is to detect this case: my
while loop cannot find a root chipset on these architectures since there
is no pci_dev. So the while loop will return another pci_dev, either the
device or another bridge. When we detect that this pci_dev has a wrong
exp_type (not PCI_EXP_TYPE_ROOT_PORT), we know it is not a root chipset,
thus we do not check its no_msi flag.

Brice

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux