Commit 881fccb8 authored by Don Hiatt's avatar Don Hiatt Committed by Doug Ledford

IB/hfi1: Add rvt_rnr_tbl_to_usec function

Return usec from an index into ib_rvt_rnr_table.
Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDon Hiatt <don.hiatt@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent db069ecb
...@@ -1954,6 +1954,17 @@ void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err) ...@@ -1954,6 +1954,17 @@ void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err)
} }
EXPORT_SYMBOL(rvt_rc_error); 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) static inline unsigned long rvt_aeth_to_usec(u32 aeth)
{ {
return ib_rvt_rnr_table[(aeth >> RVT_AETH_CREDIT_SHIFT) & return ib_rvt_rnr_table[(aeth >> RVT_AETH_CREDIT_SHIFT) &
......
...@@ -653,6 +653,7 @@ struct rvt_dev_info; ...@@ -653,6 +653,7 @@ struct rvt_dev_info;
void rvt_comm_est(struct rvt_qp *qp); void rvt_comm_est(struct rvt_qp *qp);
int rvt_error_qp(struct rvt_qp *qp, enum ib_wc_status err); int rvt_error_qp(struct rvt_qp *qp, enum ib_wc_status err);
void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err); void rvt_rc_error(struct rvt_qp *qp, enum ib_wc_status err);
unsigned long rvt_rnr_tbl_to_usec(u32 index);
enum hrtimer_restart rvt_rc_rnr_retry(struct hrtimer *t); enum hrtimer_restart rvt_rc_rnr_retry(struct hrtimer *t);
void rvt_add_rnr_timer(struct rvt_qp *qp, u32 aeth); void rvt_add_rnr_timer(struct rvt_qp *qp, u32 aeth);
void rvt_del_timers_sync(struct rvt_qp *qp); void rvt_del_timers_sync(struct rvt_qp *qp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment