summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/chip.c
diff options
context:
space:
mode:
authorJareer Abdel-Qader2015-11-07 02:07:00 +0100
committerGreg Kroah-Hartman2015-11-16 05:02:47 +0100
commit4ef98989cb08af8c7c9c955cd69327bb67dcd027 (patch)
tree9668be17403fc7336e1002d9afa95295f57f9911 /drivers/staging/rdma/hfi1/chip.c
parentstaging/rdma/hfi1: Always download SBus firmware (diff)
downloadkernel-qcow2-linux-4ef98989cb08af8c7c9c955cd69327bb67dcd027.tar.gz
kernel-qcow2-linux-4ef98989cb08af8c7c9c955cd69327bb67dcd027.tar.xz
kernel-qcow2-linux-4ef98989cb08af8c7c9c955cd69327bb67dcd027.zip
staging/rdma/hfi1: Disable thermal polling before sensor initialization
During driver load the thermal sensor needs to be reset prior to initialization of the sensor. This prevents a possible sensor lock up which can cause the wrong temperature value to be reported. This fix leads to remove disabling thermal polling from reset_asic_csrs() function. Reviewed by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Jareer Abdel-Qader <jareer.h.abdel-qader@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r--drivers/staging/rdma/hfi1/chip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index dd2ba2516a66..e842aee00535 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -9449,7 +9449,7 @@ static void reset_asic_csrs(struct hfi1_devdata *dd)
/* We might want to retain this state across FLR if we ever use it */
write_csr(dd, ASIC_CFG_DRV_STR, 0);
- write_csr(dd, ASIC_CFG_THERM_POLL_EN, 0);
+ /* ASIC_CFG_THERM_POLL_EN leave alone */
/* ASIC_STS_THERM read-only */
/* ASIC_CFG_RESET leave alone */
@@ -10794,7 +10794,9 @@ static int thermal_init(struct hfi1_devdata *dd)
acquire_hw_mutex(dd);
dd_dev_info(dd, "Initializing thermal sensor\n");
-
+ /* Disable polling of thermal readings */
+ write_csr(dd, ASIC_CFG_THERM_POLL_EN, 0x0);
+ msleep(100);
/* Thermal Sensor Initialization */
/* Step 1: Reset the Thermal SBus Receiver */
ret = sbus_request_slow(dd, SBUS_THERMAL, 0x0,