Lines Matching refs:mw_count
230 unsigned int mw_count; member
272 #define QP_TO_MW(nt, qp) ((qp) % nt->mw_count)
623 unsigned int mw_num, mw_count, qp_count; in ntb_transport_setup_qp_mw() local
627 mw_count = nt->mw_count; in ntb_transport_setup_qp_mw()
636 if (mw_num < qp_count % mw_count) in ntb_transport_setup_qp_mw()
637 num_qps_mw = qp_count / mw_count + 1; in ntb_transport_setup_qp_mw()
639 num_qps_mw = qp_count / mw_count; in ntb_transport_setup_qp_mw()
642 qp->rx_buff = mw->virt_addr + rx_size * (qp_num / mw_count); in ntb_transport_setup_qp_mw()
1010 for (i = 0; i < nt->mw_count; i++) in ntb_transport_link_cleanup()
1065 for (i = 0; i < nt->mw_count; i++) { in ntb_transport_link_work()
1078 ntb_peer_spad_write(ndev, PIDX, NUM_MWS, nt->mw_count); in ntb_transport_link_work()
1097 if (val != nt->mw_count) in ntb_transport_link_work()
1100 for (i = 0; i < nt->mw_count; i++) { in ntb_transport_link_work()
1131 for (i = 0; i < nt->mw_count; i++) in ntb_transport_link_work()
1185 unsigned int mw_num, mw_count, qp_count; in ntb_transport_init_queue() local
1188 mw_count = nt->mw_count; in ntb_transport_init_queue()
1201 if (mw_num < qp_count % mw_count) in ntb_transport_init_queue()
1202 num_qps_mw = qp_count / mw_count + 1; in ntb_transport_init_queue()
1204 num_qps_mw = qp_count / mw_count; in ntb_transport_init_queue()
1213 qp_offset = tx_size * (qp_num / mw_count); in ntb_transport_init_queue()
1267 unsigned int mw_count, qp_count, spad_count, max_mw_count_for_spads; in ntb_transport_probe() local
1272 mw_count = ntb_peer_mw_count(ndev); in ntb_transport_probe()
1301 if (use_msi && mw_count > 1) { in ntb_transport_probe()
1304 mw_count -= 1; in ntb_transport_probe()
1314 nt->mw_count = 0; in ntb_transport_probe()
1320 nt->mw_count = min(mw_count, max_mw_count_for_spads); in ntb_transport_probe()
1322 nt->msi_spad_offset = nt->mw_count * 2 + MW0_SZ_HIGH; in ntb_transport_probe()
1324 nt->mw_vec = kcalloc_node(mw_count, sizeof(*nt->mw_vec), in ntb_transport_probe()
1331 for (i = 0; i < mw_count; i++) { in ntb_transport_probe()
1362 else if (nt->mw_count < qp_count) in ntb_transport_probe()
1363 qp_count = nt->mw_count; in ntb_transport_probe()
1449 for (i = nt->mw_count; i--; ) { in ntb_transport_free()