summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/platform.c
diff options
context:
space:
mode:
authorJakub Byczkowski <jakub.byczkowski@intel.com>2017-08-13 08:08:34 -0700
committerDoug Ledford <dledford@redhat.com>2017-08-22 14:22:37 -0400
commit9161860463e38e1046a5fd57130be150cc0cac5d (patch)
treef865aefc2b535b38dd3a69f414dbb6da0825ead6 /drivers/infiniband/hw/hfi1/platform.c
parent55774d09b7a1f0d2bfec3320ed71d30fe05466a1 (diff)
IB/hfi1: Add flag for platform config scratch register read
Add flag in pport data structure to determine when platform config was read from scratch registers. Change conditions in parse_platform_config and get_platform_config_field to use the new flag. Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/platform.c')
-rw-r--r--drivers/infiniband/hw/hfi1/platform.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/platform.c b/drivers/infiniband/hw/hfi1/platform.c
index 5c38a24484ab..ab221b05d553 100644
--- a/drivers/infiniband/hw/hfi1/platform.c
+++ b/drivers/infiniband/hw/hfi1/platform.c
@@ -138,6 +138,8 @@ static void save_platform_config_fields(struct hfi1_devdata *dd)
ppd->max_power_class = (temp_scratch & QSFP_MAX_POWER_SMASK) >>
QSFP_MAX_POWER_SHIFT;
+
+ ppd->config_from_scratch = true;
}
void get_platform_config(struct hfi1_devdata *dd)