diff options
author | Dean Luick | 2016-03-05 17:50:01 +0100 |
---|---|---|
committer | Doug Ledford | 2016-03-17 20:55:14 +0100 |
commit | 576531fde8473333322905ea09fd5cfd14ce91ef (patch) | |
tree | 47f5d34bf5a53b0b7f35ab10b42d547d1f4a1e4d /drivers/staging/rdma/hfi1/pcie.c | |
parent | IB/hfi1: Change EPROM handling to use resource reservation (diff) | |
download | kernel-qcow2-linux-576531fde8473333322905ea09fd5cfd14ce91ef.tar.gz kernel-qcow2-linux-576531fde8473333322905ea09fd5cfd14ce91ef.tar.xz kernel-qcow2-linux-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/pcie.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/pcie.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/staging/rdma/hfi1/pcie.c b/drivers/staging/rdma/hfi1/pcie.c index 1adfa8bfaf2b..42a409f16449 100644 --- a/drivers/staging/rdma/hfi1/pcie.c +++ b/drivers/staging/rdma/hfi1/pcie.c @@ -773,7 +773,7 @@ static int load_eq_table(struct hfi1_devdata *dd, const u8 eq[11][3], u8 fs, /* * Steps to be done after the PCIe firmware is downloaded and * before the SBR for the Pcie Gen3. - * The hardware mutex is already being held. + * The SBus resource is already being held. */ static void pcie_post_steps(struct hfi1_devdata *dd) { @@ -1012,10 +1012,13 @@ int do_pcie_gen3_transition(struct hfi1_devdata *dd) goto done_no_mutex; } - /* hold the HW mutex across the firmware download and SBR */ - ret = acquire_hw_mutex(dd); - if (ret) + /* hold the SBus resource across the firmware download and SBR */ + ret = acquire_chip_resource(dd, CR_SBUS, SBUS_TIMEOUT); + if (ret) { + dd_dev_err(dd, "%s: unable to acquire SBus resource\n", + __func__); return ret; + } /* make sure thermal polling is not causing interrupts */ therm = read_csr(dd, ASIC_CFG_THERM_POLL_EN); @@ -1324,7 +1327,7 @@ done: dd_dev_info(dd, "%s: Re-enable therm polling\n", __func__); } - release_hw_mutex(dd); + release_chip_resource(dd, CR_SBUS); done_no_mutex: /* return no error if it is OK to be at current speed */ if (ret && !return_error) { |