* [PATCH v2] of: fix PCI bus match for PCIe slots
@ 2014-02-03 15:31 Kleber Sacilotto de Souza
[not found] ` <1391441463-12461-1-git-send-email-klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
[not found] ` < 20140204143238.E17E3C407C9@trevor.secretlab.ca>
0 siblings, 2 replies; 4+ messages in thread
From: Kleber Sacilotto de Souza @ 2014-02-03 15:31 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Benjamin Herrenschmidt, Brian King, Grant Likely, Rob Herring,
Kleber Sacilotto de Souza
On IBM pseries systems the device_type device-tree property of a PCIe
bridge contains the string "pciex". The of_bus_pci_match() function was
looking only for "pci" on this property, so in such cases the bus
matching code was falling back to the default bus, causing problems on
functions that should be using "assigned-addresses" for region address
translation. This patch fixes the problem by also looking for "pciex" on
the PCI bus match function.
v2: added comment
Signed-off-by: Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
drivers/of/address.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/of/address.c b/drivers/of/address.c
index d3dd41c..1a54f1f 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -99,11 +99,12 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
static int of_bus_pci_match(struct device_node *np)
{
/*
+ * "pciex" is PCI Express
* "vci" is for the /chaos bridge on 1st-gen PCI powermacs
* "ht" is hypertransport
*/
- return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") ||
- !strcmp(np->type, "ht");
+ return !strcmp(np->type, "pci") || !strcmp(np->type, "pciex") ||
+ !strcmp(np->type, "vci") || !strcmp(np->type, "ht");
}
static void of_bus_pci_count_cells(struct device_node *np,
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] of: fix PCI bus match for PCIe slots
[not found] ` <1391441463-12461-1-git-send-email-klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2014-02-04 14:32 ` Grant Likely
[not found] ` <20140204143238.E17E3C407C9-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2014-02-04 14:32 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Benjamin Herrenschmidt, Brian King, Rob Herring,
Kleber Sacilotto de Souza
On Mon, 3 Feb 2014 13:31:03 -0200, Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
> On IBM pseries systems the device_type device-tree property of a PCIe
> bridge contains the string "pciex". The of_bus_pci_match() function was
> looking only for "pci" on this property, so in such cases the bus
> matching code was falling back to the default bus, causing problems on
> functions that should be using "assigned-addresses" for region address
> translation. This patch fixes the problem by also looking for "pciex" on
> the PCI bus match function.
>
> v2: added comment
>
> Signed-off-by: Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Applied, thanks.
g.
> ---
> drivers/of/address.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index d3dd41c..1a54f1f 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -99,11 +99,12 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
> static int of_bus_pci_match(struct device_node *np)
> {
> /*
> + * "pciex" is PCI Express
> * "vci" is for the /chaos bridge on 1st-gen PCI powermacs
> * "ht" is hypertransport
> */
> - return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") ||
> - !strcmp(np->type, "ht");
> + return !strcmp(np->type, "pci") || !strcmp(np->type, "pciex") ||
> + !strcmp(np->type, "vci") || !strcmp(np->type, "ht");
> }
>
> static void of_bus_pci_count_cells(struct device_node *np,
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] of: fix PCI bus match for PCIe slots
[not found] ` <20140204143238.E17E3C407C9-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
@ 2014-02-04 14:44 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2014-02-04 14:44 UTC (permalink / raw)
To: Grant Likely
Cc: Kleber Sacilotto de Souza,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Benjamin Herrenschmidt, Brian King, Rob Herring
On Tue, Feb 4, 2014 at 8:32 AM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On Mon, 3 Feb 2014 13:31:03 -0200, Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
>> On IBM pseries systems the device_type device-tree property of a PCIe
>> bridge contains the string "pciex". The of_bus_pci_match() function was
>> looking only for "pci" on this property, so in such cases the bus
>> matching code was falling back to the default bus, causing problems on
>> functions that should be using "assigned-addresses" for region address
>> translation. This patch fixes the problem by also looking for "pciex" on
>> the PCI bus match function.
>>
>> v2: added comment
>>
>> Signed-off-by: Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>
> Applied, thanks.
I was planning to apply for 3.14 and stable.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] of: fix PCI bus match for PCIe slots
[not found] ` <CAL_JsqLjxM3waG+LkQr0NfwhjrJ039v6PQneN=cyfUS2d8=5aQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-04 16:54 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2014-02-04 16:54 UTC (permalink / raw)
To: Rob Herring
Cc: Kleber Sacilotto de Souza,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Benjamin Herrenschmidt, Brian King, Rob Herring
On Tue, 4 Feb 2014 08:44:43 -0600, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Tue, Feb 4, 2014 at 8:32 AM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> > On Mon, 3 Feb 2014 13:31:03 -0200, Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
> >> On IBM pseries systems the device_type device-tree property of a PCIe
> >> bridge contains the string "pciex". The of_bus_pci_match() function was
> >> looking only for "pci" on this property, so in such cases the bus
> >> matching code was falling back to the default bus, causing problems on
> >> functions that should be using "assigned-addresses" for region address
> >> translation. This patch fixes the problem by also looking for "pciex" on
> >> the PCI bus match function.
> >>
> >> v2: added comment
> >>
> >> Signed-off-by: Kleber Sacilotto de Souza <klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> >
> > Applied, thanks.
>
> I was planning to apply for 3.14 and stable.
Okay, I'll drop it and let you pick it up. You can add my:
Acked-by: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-04 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 15:31 [PATCH v2] of: fix PCI bus match for PCIe slots Kleber Sacilotto de Souza
[not found] ` <1391441463-12461-1-git-send-email-klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-02-04 14:32 ` Grant Likely
[not found] ` <20140204143238.E17E3C407C9-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-02-04 14:44 ` Rob Herring
[not found] ` < 20140204143238.E17E3C407C9@trevor.secretlab.ca>
[not found] ` < CAL_JsqLjxM3waG+LkQr0NfwhjrJ039v6PQneN=cyfUS2d8=5aQ@mail.gmail.com>
[not found] ` <CAL_JsqLjxM3waG+LkQr0NfwhjrJ039v6PQneN=cyfUS2d8=5aQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-04 16:54 ` Grant Likely
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).