of: fix PCI bus match for PCIe slots
PATCH v2 1/1 of: fix PCI bus match for PCIe slots
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
--- drivers/of/address.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/of/address.c +3 -2
@@ -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,
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1391441463-12461-1-git-send-email-klebers-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Grant Likely
AppliedQuoted 11 lines · Kleber Sacilotto de Souza
On IBM pseries systems the
device_typedevice-tree property of a PCIe bridge contains the string "pciex". Theof_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 <[email protected]>
Applied, thanks.
g.
Quoted 26 lines
--- drivers/of/address.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/of/address.c +3
-2@@ -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,Signature · 1 line
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20140204143238.E17E3C407C9-WNowdnHR2B42iJbIjFUEsiwD8/[email protected]
Quoted 9 lines · Grant Likely
Quoted 8 lines · Kleber Sacilotto de Souza
On IBM pseries systems the
device_typedevice-tree property of a PCIe bridge contains the string "pciex". Theof_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.
Quoted 5 lines
Quoted 3 lines
v2: added comment
Signed-off-by Kleber Sacilotto de Souza <[email protected]>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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAL_JsqLjxM3waG+LkQr0NfwhjrJ039v6PQneN=cyfUS2d8=5aQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Grant Likely
Acked-byQuoted 10 lines · Rob Herring
Quoted 9 lines · Grant Likely
Quoted 8 lines · Kleber Sacilotto de Souza
On IBM pseries systems the
device_typedevice-tree property of a PCIe bridge contains the string "pciex". Theof_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.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
v2: added comment
Signed-off-by Kleber Sacilotto de Souza <[email protected]>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:
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html