From: Bjorn Helgaas <bhelgaas@google.com>
To: Duc Dang <dhdang@apm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Liviu Dudau <liviu.dudau@arm.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@apm.com, jcm@redhat.com,
Tanmay Inamdar <tinamdar@apm.com>
Subject: Re: [PATCH 1/1] PCI: X-Gene: assign resource to bus before adding new devices
Date: Thu, 13 Nov 2014 10:04:15 -0700 [thread overview]
Message-ID: <20141113170415.GF5064@google.com> (raw)
In-Reply-To: <1415322858-4318-1-git-send-email-dhdang@apm.com>
On Thu, Nov 06, 2014 at 05:14:18PM -0800, Duc Dang wrote:
> X-Gene PCIE driver currently depends on Liviu Dudau's patch
> https://lkml.org/lkml/2014/9/30/166 in order to assign resource
> to root bus and endpoint devices. The patch was dropped because
> it will break x86, powerpc and probably others. So X-Gene PCIE
> host functionality is currently broken.
>
> This patch adds function calls to create and scan root_bus as well
> as assign unassigned bus resource (similar to Liviu Dudau's patch
> above). This will help resolve the dependency to Liviu Dudau's patch
> and make X-Gene PCIE work in latest open-source kernel.
>
> Signed-off-by: Duc Dang <dhdang@apm.com>
> Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
I applied this to for-linus for v3.18, because it fixes a driver we added
in the v3.18 merge window. Thanks!
> ---
> drivers/pci/host/pci-xgene.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 9ecabfa..2988fe1 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -631,10 +631,15 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - bus = pci_scan_root_bus(&pdev->dev, 0, &xgene_pcie_ops, port, &res);
> + bus = pci_create_root_bus(&pdev->dev, 0,
> + &xgene_pcie_ops, port, &res);
> if (!bus)
> return -ENOMEM;
>
> + pci_scan_child_bus(bus);
> + pci_assign_unassigned_bus_resources(bus);
> + pci_bus_add_devices(bus);
> +
> platform_set_drvdata(pdev, port);
> return 0;
> }
> --
> 1.8.2.1
>
prev parent reply other threads:[~2014-11-13 17:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 1:14 [PATCH 1/1] PCI: X-Gene: assign resource to bus before adding new devices Duc Dang
2014-11-13 17:04 ` Bjorn Helgaas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141113170415.GF5064@google.com \
--to=bhelgaas@google.com \
--cc=arnd@arndb.de \
--cc=dhdang@apm.com \
--cc=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=patches@apm.com \
--cc=tinamdar@apm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).