Lines Matching refs:mw_count
230 unsigned int mw_count;
272 #define QP_TO_MW(nt, qp) ((qp) % nt->mw_count)
623 unsigned int mw_num, mw_count, qp_count;
627 mw_count = nt->mw_count;
636 if (mw_num < qp_count % mw_count)
637 num_qps_mw = qp_count / mw_count + 1;
639 num_qps_mw = qp_count / mw_count;
642 qp->rx_buff = mw->virt_addr + rx_size * (qp_num / mw_count);
997 for (i = 0; i < nt->mw_count; i++)
1052 for (i = 0; i < nt->mw_count; i++) {
1065 ntb_peer_spad_write(ndev, PIDX, NUM_MWS, nt->mw_count);
1084 if (val != nt->mw_count)
1087 for (i = 0; i < nt->mw_count; i++) {
1118 for (i = 0; i < nt->mw_count; i++)
1172 unsigned int mw_num, mw_count, qp_count;
1175 mw_count = nt->mw_count;
1188 if (mw_num < qp_count % mw_count)
1189 num_qps_mw = qp_count / mw_count + 1;
1191 num_qps_mw = qp_count / mw_count;
1200 qp_offset = tx_size * (qp_num / mw_count);
1254 unsigned int mw_count, qp_count, spad_count, max_mw_count_for_spads;
1259 mw_count = ntb_peer_mw_count(ndev);
1288 if (use_msi && mw_count > 1) {
1291 mw_count -= 1;
1301 nt->mw_count = 0;
1307 nt->mw_count = min(mw_count, max_mw_count_for_spads);
1309 nt->msi_spad_offset = nt->mw_count * 2 + MW0_SZ_HIGH;
1311 nt->mw_vec = kcalloc_node(mw_count, sizeof(*nt->mw_vec),
1318 for (i = 0; i < mw_count; i++) {
1349 else if (nt->mw_count < qp_count)
1350 qp_count = nt->mw_count;
1436 for (i = nt->mw_count; i--; ) {