summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDon Hiatt <don.hiatt@intel.com>2017-02-08 16:28:19 +0300
committerDoug Ledford <dledford@redhat.com>2017-02-19 17:18:44 +0300
commit881fccb8640bdd3533f5a98a99991aae23a5106b (patch)
tree11468dab482e4ba83808a1083bfecbcca33a5e3c /drivers/infiniband
parentdb069ecb5d4dcd297628d5ebc56dd22bdbab9729 (diff)
downloadlinux-881fccb8640bdd3533f5a98a99991aae23a5106b.tar.xz
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')
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c11
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) &