diff options
author | Mark Brown <broonie@kernel.org> | 2017-08-25 14:44:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-25 14:44:05 +0100 |
commit | b7e2672d1a23a53bd2657704bf94a8dc8880cc49 (patch) | |
tree | 7e315f84913b6cd896fda558724961b39a735587 /include/rdma/rdmavt_qp.h | |
parent | c0d1cb8366bab9963822c27b0d40cb8b32928cdc (diff) | |
parent | 9ce76511b67be8fbcdff36b7e1662e3887bb7377 (diff) | |
download | linux-b7e2672d1a23a53bd2657704bf94a8dc8880cc49.tar.gz linux-b7e2672d1a23a53bd2657704bf94a8dc8880cc49.tar.bz2 linux-b7e2672d1a23a53bd2657704bf94a8dc8880cc49.zip |
Merge tag 'sound-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-rt5677
sound fixes for 4.13-rc7
We're keeping in a good shape, this batch contains just a few small
fixes (a regression fix for ASoC rt5677 codec, NULL dereference and
error-path fixes in firewire, and a corner-case ioctl error fix for
user TLV), as well as usual quirks for USB-audio and HD-audio.
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; |