diff options
author | 2017-02-08 05:28:19 -0800 | |
---|---|---|
committer | 2017-02-19 09:18:44 -0500 | |
commit | 881fccb8640bdd3533f5a98a99991aae23a5106b (patch) | |
tree | 11468dab482e4ba83808a1083bfecbcca33a5e3c /drivers/infiniband/sw | |
parent | IB/hfi1: Do not set physical link state if DC is in the shutdown state (diff) | |
download | linux-881fccb8640bdd3533f5a98a99991aae23a5106b.tar.gz linux-881fccb8640bdd3533f5a98a99991aae23a5106b.tar.bz2 linux-881fccb8640bdd3533f5a98a99991aae23a5106b.zip |
IB/hfi1: Add rvt_rnr_tbl_to_usec function
Return usec from an index into ib_rvt_rnr_table.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/qp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index db4315f8f0c8..0b97598136b4 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -1954,6 +1954,17 @@ void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err) } EXPORT_SYMBOL(rvt_rc_error); +/* + * rvt_rnr_tbl_to_usec - return index into ib_rvt_rnr_table + * @index - the index + * return usec from an index into ib_rvt_rnr_table + */ +unsigned long rvt_rnr_tbl_to_usec(u32 index) +{ + return ib_rvt_rnr_table[(index & RVT_AETH_CREDIT_MASK)]; +} +EXPORT_SYMBOL(rvt_rnr_tbl_to_usec); + static inline unsigned long rvt_aeth_to_usec(u32 aeth) { return ib_rvt_rnr_table[(aeth >> RVT_AETH_CREDIT_SHIFT) & |