Lines Matching refs:widx
215 int widx; member
805 tool_setup_mw(struct tool_ctx *tc, unsigned int pidx, unsigned int widx, in tool_setup_mw() argument
808 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; in tool_setup_mw()
846 rc = ntb_mw_set_trans(tc->dev, widx, inmw->dma_base, inmw->size); in tool_setup_mw()
872 tool_free_mw(struct tool_ctx *tc, int pidx, int widx) in tool_free_mw() argument
874 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; in tool_free_mw()
877 ntb_mw_clear_trans(tc->dev, widx); in tool_free_mw()
906 sbuf_printf(sb, "\nInbound MW \t%d\n", inmw->widx); in tool_mw_trans_read()
939 tool_free_mw(tc, inmw->pidx, inmw->widx); in tool_mw_trans_write()
941 rc = tool_setup_mw(tc, inmw->pidx, inmw->widx, wsize); in tool_mw_trans_write()
989 int widx, pidx; in tool_clear_mws() local
993 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) in tool_clear_mws()
994 tool_free_mw(tc, pidx, widx); in tool_clear_mws()
1003 int widx, pidx, rc; in tool_init_mws() local
1012 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) { in tool_init_mws()
1013 mw = &tc->peers[pidx].inmws[widx]; in tool_init_mws()
1016 mw->widx = widx; in tool_init_mws()
1021 rc = ntb_mw_get_range(tc->dev, widx, &mw->phys_addr, in tool_init_mws()
1314 unsigned int pidx, sidx, widx; in tool_setup_sysctl() local
1382 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) { in tool_setup_sysctl()
1383 snprintf(buf, sizeof(buf), "mw_trans%d", widx); in tool_setup_sysctl()
1384 snprintf(desc, sizeof(desc), "mw trans%d info", widx); in tool_setup_sysctl()
1388 &tc->peers[pidx].inmws[widx], 0, in tool_setup_sysctl()
1391 snprintf(buf, sizeof(buf), "mw%d", widx); in tool_setup_sysctl()
1392 snprintf(desc, sizeof(desc), "mw%d info", widx); in tool_setup_sysctl()
1396 &tc->peers[pidx].inmws[widx], 0, in tool_setup_sysctl()
1399 snprintf(buf, sizeof(buf), "peer_mw%d", widx); in tool_setup_sysctl()
1400 snprintf(desc, sizeof(desc), "peer_mw%d info", widx); in tool_setup_sysctl()
1404 &tc->peers[pidx].inmws[widx], 0, in tool_setup_sysctl()