Re: [PATCH 01/28] PCI: Rip out pci_bus_add_devices() from pci_scan_bus()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Yijing Wang <wangyijing@xxxxxxxxxx>
- Subject: Re: [PATCH 01/28] PCI: Rip out pci_bus_add_devices() from pci_scan_bus()
- From: Yinghai Lu <yinghai@xxxxxxxxxx>
- Date: Fri, 16 Jan 2015 15:16:28 -0800
- Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Marc Zyngier <marc.zyngier@xxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, "the arch/x86 maintainers" <x86@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, Liviu Dudau <liviu@xxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>
- In-reply-to: <CAE9FiQUoocCzBKsHL_D4ypH1-DV7XxZMdREX7n=Tz1Kq3kHHeA@mail.gmail.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1421372666-12288-1-git-send-email-wangyijing@huawei.com> <1421372666-12288-2-git-send-email-wangyijing@huawei.com> <CAE9FiQUoocCzBKsHL_D4ypH1-DV7XxZMdREX7n=Tz1Kq3kHHeA@mail.gmail.com>
On Fri, Jan 16, 2015 at 3:15 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> On Thu, Jan 15, 2015 at 5:43 PM, Yijing Wang <wangyijing@xxxxxxxxxx> wrote:
>> Pci_bus_add_devices() should not be placed in pci_scan_bus().
>> Now pci device will be added to driver core once its
>> creation. All things left in pci_bus_add_devices() are
>> driver attachment and other trivial sysfs things.
>> Pci_scan_bus() should be the function responsible for
>> scanning PCI devices, not including driver attachment.
>> Other, some callers(m68k,unicore32,alpha) of pci_scan_bus()
>> will call pci_bus_size_bridges() and pci_bus_assign_resources()
>> after pci_scan_bus().
>>
>> E.g.
>> In m68k
>> mcf_pci_init()
>> pci_scan_bus()
>> ...
>> pci_bus_add_devices() --- try to attach driver
>> pci_fixup_irqs()
>> pci_bus_size_bridges()
>> pci_bus_assign_resources()
>>
>> It is not correct, resources should be assigned correctly
>> before attaching driver.
>
No, for booting path, at that time pci drivers are *NOT* loaded yet.
Thanks
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]