ib_srpt: Builds again on 32-bit systems

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-08-17 08:21:08 +00:00
parent 50c2ef2e01
commit 832968b65e
+6 -4
View File
@@ -1136,7 +1136,7 @@ static int srpt_ch_qp_rts(struct srpt_rdma_ch *ch, struct ib_qp *qp)
int attr_mask;
int ret;
uint64_t T_tr_ns;
uint32_t max_compl_time_ms;
uint32_t T_tr_ms, max_compl_time_ms;
attr = kzalloc(sizeof *attr, GFP_KERNEL);
if (!attr)
@@ -1157,11 +1157,13 @@ static int srpt_ch_qp_rts(struct srpt_rdma_ch *ch, struct ib_qp *qp)
WARN_ON(attr->timeout >= (1 << 5));
if (attr->timeout) {
T_tr_ns = 1ULL << (12 + attr->timeout);
max_compl_time_ms = attr->retry_cnt * 4 * T_tr_ns / 1000000;
max_compl_time_ms = attr->retry_cnt * 4 * T_tr_ns;
do_div(max_compl_time_ms, 1000000);
T_tr_ms = T_tr_ns;
do_div(T_tr_ms, 1000000);
TRACE_DBG("Session %s: QP local ack timeout = %d or T_tr ="
" %u ms; retry_cnt = %d; max compl. time = %d ms",
ch->sess_name,
attr->timeout, (unsigned)(T_tr_ns / (1000 * 1000)),
ch->sess_name, attr->timeout, T_tr_ms,
attr->retry_cnt, max_compl_time_ms);
if (max_compl_time_ms >= RDMA_COMPL_TIMEOUT_S * 1000) {