Lines Matching refs:mw_count
230 unsigned int mw_count;
272 #define QP_TO_MW(nt, qp) ((qp) % nt->mw_count)
621 unsigned int mw_num, mw_count, qp_count;
625 mw_count = nt->mw_count;
634 if (mw_num < qp_count % mw_count)
635 num_qps_mw = qp_count / mw_count + 1;
637 num_qps_mw = qp_count / mw_count;
640 qp->rx_buff = mw->virt_addr + rx_size * (qp_num / mw_count);
995 for (i = 0; i < nt->mw_count; i++)
1050 for (i = 0; i < nt->mw_count; i++) {
1063 ntb_peer_spad_write(ndev, PIDX, NUM_MWS, nt->mw_count);
1082 if (val != nt->mw_count)
1085 for (i = 0; i < nt->mw_count; i++) {
1116 for (i = 0; i < nt->mw_count; i++)
1170 unsigned int mw_num, mw_count, qp_count;
1173 mw_count = nt->mw_count;
1186 if (mw_num < qp_count % mw_count)
1187 num_qps_mw = qp_count / mw_count + 1;
1189 num_qps_mw = qp_count / mw_count;
1198 qp_offset = tx_size * (qp_num / mw_count);
1252 unsigned int mw_count, qp_count, spad_count, max_mw_count_for_spads;
1257 mw_count = ntb_peer_mw_count(ndev);
1286 if (use_msi && mw_count > 1) {
1289 mw_count -= 1;
1299 nt->mw_count = 0;
1305 nt->mw_count = min(mw_count, max_mw_count_for_spads);
1307 nt->msi_spad_offset = nt->mw_count * 2 + MW0_SZ_HIGH;
1309 nt->mw_vec = kcalloc_node(mw_count, sizeof(*nt->mw_vec),
1316 for (i = 0; i < mw_count; i++) {
1347 else if (nt->mw_count < qp_count)
1348 qp_count = nt->mw_count;
1434 for (i = nt->mw_count; i--; ) {