aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-04-14 13:43:43 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:51:29 +1000
commit7efd876299cddf67c06bf7a7a3e6a79a1f4c2d6f (patch)
treeb2c1fd3d7e00b22dee5836a1229c07547ab10aff /hdata
parent9e5747525d909fbf71a68d3593bba06d2bc4e86c (diff)
downloadskiboot-7efd876299cddf67c06bf7a7a3e6a79a1f4c2d6f.zip
skiboot-7efd876299cddf67c06bf7a7a3e6a79a1f4c2d6f.tar.gz
skiboot-7efd876299cddf67c06bf7a7a3e6a79a1f4c2d6f.tar.bz2
hdata/vpd: Improve error logging
Populate CCIN description and model-name property as "Unknown" if its not available (say new system model, etc). That way device tree will be consistent. Also improve error logging. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/vpd.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/hdata/vpd.c b/hdata/vpd.c
index 38b0737..585ed9c 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -132,9 +132,14 @@ static void vpd_vini_parse(struct dt_node *node,
memcpy(str, kw, kwsz);
dt_add_property_string(node, "ccin", str);
cinfo = card_info_lookup(str);
- if (cinfo)
- dt_add_property_string(node,
+ if (cinfo) {
+ dt_add_property_string(node,
"description", cinfo->description);
+ } else {
+ dt_add_property_string(node, "description", "Unknown");
+ prlog(PR_WARNING,
+ "VPD: CCIN desc not available for : %s\n", str);
+ }
free(str);
}
return;
@@ -423,6 +428,9 @@ static const char *vpd_map_name(const char *vpd_name)
}
break;
}
+
+ prlog(PR_WARNING,
+ "VPD: Could not map FRU ID %s to a known name\n", vpd_name);
return "Unknown";
}
@@ -632,8 +640,13 @@ static void sysvpd_parse(void)
memcpy(str, model, sz);
dt_add_property_string(dt_root, "model", str);
mi = machine_info_lookup(str);
- if (mi)
+ if (mi) {
dt_add_property_string(dt_root, "model-name", mi->name);
+ } else {
+ dt_add_property_string(dt_root, "model-name", "Unknown");
+ prlog(PR_WARNING, "VPD: Model name %s not known\n", str);
+ }
+
free(str);
dt_add_property_string(dt_root, "vendor", "IBM");