Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbbGWOZI (ORCPT ); Thu, 23 Jul 2015 10:25:08 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:40609 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804AbbGWOZF (ORCPT ); Thu, 23 Jul 2015 10:25:05 -0400 Message-ID: <55B0F91A.7020206@ti.com> Date: Thu, 23 Jul 2015 10:24:26 -0400 From: Murali Karicheri Organization: Texas Instruments User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: , , , , Subject: Re: [PATCH] ARM/PCI: set MPS before pci_bus_add_devices() References: <1437514519-18545-1-git-send-email-m-karicheri2@ti.com> In-Reply-To: <1437514519-18545-1-git-send-email-m-karicheri2@ti.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2205 Lines: 71 On 07/21/2015 05:35 PM, Murali Karicheri wrote: > The MPS configuration should be done *before* pci_bus_add_devices(). > After pci_bus_add_devices(), drivers may be bound to devices, and > the PCI core shouldn't touch device configuration while a driver > owns the device. > > Signed-off-by: Murali Karicheri > Reported-by: Bjorn Helgaas > --- > arch/arm/kernel/bios32.c | 19 +++++-------------- > 1 file changed, 5 insertions(+), 14 deletions(-) > > diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c > index fcbbbb1..17efde7 100644 > --- a/arch/arm/kernel/bios32.c > +++ b/arch/arm/kernel/bios32.c > @@ -520,7 +520,8 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw) > list_for_each_entry(sys, &head, node) { > struct pci_bus *bus = sys->bus; > > - if (!pci_has_flag(PCI_PROBE_ONLY)) { > + if (bus && !pci_has_flag(PCI_PROBE_ONLY)) { > + struct pci_bus *child; > /* > * Size the bridge windows. > */ > @@ -530,25 +531,15 @@ void pci_common_init_dev(struct device *parent, struct hw_pci *hw) > * Assign resources. > */ > pci_bus_assign_resources(bus); > - } > > + list_for_each_entry(child, &bus->children, node) > + pcie_bus_configure_settings(child); > + } > /* > * Tell drivers about devices found. > */ > pci_bus_add_devices(bus); > } > - > - list_for_each_entry(sys, &head, node) { > - struct pci_bus *bus = sys->bus; > - > - /* Configure PCI Express settings */ > - if (bus && !pci_has_flag(PCI_PROBE_ONLY)) { > - struct pci_bus *child; > - > - list_for_each_entry(child, &bus->children, node) > - pcie_bus_configure_settings(child); > - } > - } > } > > #ifndef CONFIG_PCI_HOST_ITE8152 > Bjorn, When you get a chance, please review this. We discussed this change in a separate thread and agreed for a patch from me. Thanks and regards -- Murali Karicheri Linux Kernel, Keystone -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/