diff options
author | Dean Luick <dean.luick@intel.com> | 2016-03-05 08:50:01 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-17 15:55:14 -0400 |
commit | 576531fde8473333322905ea09fd5cfd14ce91ef (patch) | |
tree | 47f5d34bf5a53b0b7f35ab10b42d547d1f4a1e4d /drivers/staging/rdma/hfi1/chip.c | |
parent | 60c708285c0d3877a78dd8ede24238bc68c09651 (diff) | |
download | linux-stable-576531fde8473333322905ea09fd5cfd14ce91ef.tar.gz linux-stable-576531fde8473333322905ea09fd5cfd14ce91ef.tar.bz2 linux-stable-576531fde8473333322905ea09fd5cfd14ce91ef.zip |
IB/hfi1: Change SBus handling to use resource reservation
The SBus resource includes SBUS, PCIE, and THERM registers.
Change SBus handling to use the new ASIC resource reservation system.
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/chip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index 98ebee4aac22..269c9775f7c6 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -14324,7 +14324,12 @@ static int thermal_init(struct hfi1_devdata *dd) !(dd->flags & HFI1_DO_INIT_ASIC)) return ret; - acquire_hw_mutex(dd); + ret = acquire_chip_resource(dd, CR_SBUS, SBUS_TIMEOUT); + if (ret) { + THERM_FAILURE(dd, ret, "Acquire SBus"); + return ret; + } + dd_dev_info(dd, "Initializing thermal sensor\n"); /* Disable polling of thermal readings */ write_csr(dd, ASIC_CFG_THERM_POLL_EN, 0x0); @@ -14372,7 +14377,7 @@ static int thermal_init(struct hfi1_devdata *dd) /* Enable polling of thermal readings */ write_csr(dd, ASIC_CFG_THERM_POLL_EN, 0x1); done: - release_hw_mutex(dd); + release_chip_resource(dd, CR_SBUS); return ret; } |