aboutsummaryrefslogtreecommitdiff
path: root/core/pci.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-08-20 11:29:27 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-01 16:11:08 +1000
commited76b810b9f026969041e7a79594664e1e7e9c74 (patch)
tree3c2802de66864256011accbd2686e28e7cc1e36b /core/pci.c
parent7df64e132bdb0a87a92b3edb1edae6b50198828e (diff)
downloadskiboot-ed76b810b9f026969041e7a79594664e1e7e9c74.zip
skiboot-ed76b810b9f026969041e7a79594664e1e7e9c74.tar.gz
skiboot-ed76b810b9f026969041e7a79594664e1e7e9c74.tar.bz2
pci: Don't create -T location codes on non-FSP machines
This is a temporary workaround. We disable the code that adds the "-T" portion of the location code to network devices on non-FSP machines. This code is a bit fragile, and it does incorrect things on dual-slot mezzanines such as the one in Habanero. If we need to support this on OpenPower, we will need to add a concept of sibling slots to the infrastructure to properly handle the numbering. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r--core/pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/pci.c b/core/pci.c
index 479c435..1c2247e 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1180,7 +1180,11 @@ static void pci_add_loc_code(struct dt_node *np, struct pci_device *pd)
class_code = dt_prop_get_u32(np, "class-code");
class = class_code >> 16;
sub = (class_code >> 8) & 0xff;
- if (class == 0x02 && sub == 0x00) {
+
+ /* XXX Don't do that on openpower for now, we will need to sort things
+ * out later, otherwise the mezzanine slot on Habanero gets weird results
+ */
+ if (class == 0x02 && sub == 0x00 && fsp_present()) {
/* There's usually several spaces at the end of the property.
Test for, but don't rely on, that being the case */
len = strlen(blcode);