Re: why early_quirks only scan first 32 pci bus

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

 



On Monday, January 12, 2009 12:45 am Crane Cai wrote:
> Hi Jesse,
>
> Sorry to disturb you. This is a question needs you help:
>
> In file: $(KERNEL_SRC)/arch/x86/kernel/early-quirks.c
> function early_quirks:
> ---
> void __init early_quirks(void)
> {
>         int num, slot, func;
>
>         if (!early_pci_allowed())
>                 return;
>
>         /* Poor man's PCI discovery */
> =>      for (num = 0; num < 32; num++)
>                 for (slot = 0; slot < 32; slot++)
>                         for (func = 0; func < 8; func++) {
>                                 /* Only probe function 0 on single fn
> devices */
>                                 if (check_dev_quirk(num, slot, func))
>                                         break;
>                         }
> }
> ---
>
> Why we only scan first 32 pci bus? We know in spec there are 256 pci
> bus.

Probably because we haven't had a need for it yet.  The early quirks are 
pretty limited in scope, affecting just a few chipsets.  Doing a full scan 
when we don't need one would be overkill.

And in fact, I have a patch in my queue from Andi that limits the scan to the 
root bus, since scanning sub-busses was triggering some early quirks 
incorrectly.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux