diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-23 19:53:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-23 19:53:30 -0700 |
commit | a29e24907208a7e05e9bd3f990d3fc5ea49667de (patch) | |
tree | 9ccf691398e230764dd09ed83211376a0e77e4a9 /include/rdma/rdmavt_qp.h | |
parent | 6f6752648a868135222cb77286bca02fc8730268 (diff) | |
parent | 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff) | |
download | linux-next-a29e24907208a7e05e9bd3f990d3fc5ea49667de.tar.gz |
Merge 4.13-rc2 into staging-next
This resolves a merge issue and gets the vmbox drm driver into this
branch to be able to start taking fixes for it...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/rdma/rdmavt_qp.h')
-rw-r--r-- | include/rdma/rdmavt_qp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h index be6472e5b06b..d664d2e76280 100644 --- a/include/rdma/rdmavt_qp.h +++ b/include/rdma/rdmavt_qp.h @@ -647,6 +647,20 @@ static inline u32 rvt_div_mtu(struct rvt_qp *qp, u32 len) return len >> qp->log_pmtu; } +/** + * rvt_timeout_to_jiffies - Convert a ULP timeout input into jiffies + * @timeout - timeout input(0 - 31). + * + * Return a timeout value in jiffies. + */ +static inline unsigned long rvt_timeout_to_jiffies(u8 timeout) +{ + if (timeout > 31) + timeout = 31; + + return usecs_to_jiffies(1U << timeout) * 4096UL / 1000UL; +} + extern const int ib_rvt_state_ops[]; struct rvt_dev_info; |