Lines Matching full:peers
222 * Wrapper structure is used to distinguish the outbound MW peers reference
264 struct tool_peer *peers; member
444 tc->peers = devm_kcalloc(&tc->ntb->dev, tc->peer_cnt, in tool_init_peers()
445 sizeof(*tc->peers), GFP_KERNEL); in tool_init_peers()
446 if (tc->peers == NULL) in tool_init_peers()
450 tc->peers[pidx].pidx = pidx; in tool_init_peers()
451 tc->peers[pidx].tc = tc; in tool_init_peers()
573 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; in tool_setup_mw()
604 tc->peers[pidx].dbgfs_dir, inmw, in tool_setup_mw()
621 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx]; in tool_free_mw()
836 tc->peers[pidx].dbgfs_dir, outmw, in tool_setup_peer_mw()
977 tc->peers[pidx].inmw_cnt = ntb_mw_count(tc->ntb, pidx); in tool_init_mws()
978 tc->peers[pidx].inmws = in tool_init_mws()
979 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].inmw_cnt, in tool_init_mws()
980 sizeof(*tc->peers[pidx].inmws), GFP_KERNEL); in tool_init_mws()
981 if (tc->peers[pidx].inmws == NULL) in tool_init_mws()
984 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) { in tool_init_mws()
985 tc->peers[pidx].inmws[widx].widx = widx; in tool_init_mws()
986 tc->peers[pidx].inmws[widx].pidx = pidx; in tool_init_mws()
987 tc->peers[pidx].inmws[widx].tc = tc; in tool_init_mws()
990 tc->peers[pidx].outmw_cnt = ntb_peer_mw_count(tc->ntb); in tool_init_mws()
991 tc->peers[pidx].outmws = in tool_init_mws()
992 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outmw_cnt, in tool_init_mws()
993 sizeof(*tc->peers[pidx].outmws), GFP_KERNEL); in tool_init_mws()
994 if (tc->peers[pidx].outmws == NULL) in tool_init_mws()
997 for (widx = 0; widx < tc->peers[pidx].outmw_cnt; widx++) { in tool_init_mws()
998 tc->peers[pidx].outmws[widx].pidx = pidx; in tool_init_mws()
999 tc->peers[pidx].outmws[widx].mw = &tc->outmws[widx]; in tool_init_mws()
1016 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) in tool_clear_mws()
1252 tc->peers[pidx].outspad_cnt = ntb_spad_count(tc->ntb); in tool_init_spads()
1253 tc->peers[pidx].outspads = in tool_init_spads()
1254 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outspad_cnt, in tool_init_spads()
1255 sizeof(*tc->peers[pidx].outspads), GFP_KERNEL); in tool_init_spads()
1256 if (tc->peers[pidx].outspads == NULL) in tool_init_spads()
1259 for (sidx = 0; sidx < tc->peers[pidx].outspad_cnt; sidx++) { in tool_init_spads()
1260 tc->peers[pidx].outspads[sidx].sidx = sidx; in tool_init_spads()
1261 tc->peers[pidx].outspads[sidx].pidx = pidx; in tool_init_spads()
1262 tc->peers[pidx].outspads[sidx].tc = tc; in tool_init_spads()
1416 tc->peers[pidx].outmsg_cnt = ntb_msg_count(tc->ntb); in tool_init_msgs()
1417 tc->peers[pidx].outmsgs = in tool_init_msgs()
1418 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outmsg_cnt, in tool_init_msgs()
1419 sizeof(*tc->peers[pidx].outmsgs), GFP_KERNEL); in tool_init_msgs()
1420 if (tc->peers[pidx].outmsgs == NULL) in tool_init_msgs()
1423 for (midx = 0; midx < tc->peers[pidx].outmsg_cnt; midx++) { in tool_init_msgs()
1424 tc->peers[pidx].outmsgs[midx].midx = midx; in tool_init_msgs()
1425 tc->peers[pidx].outmsgs[midx].pidx = pidx; in tool_init_msgs()
1426 tc->peers[pidx].outmsgs[midx].tc = tc; in tool_init_msgs()
1550 tc->peers[pidx].dbgfs_dir = in tool_setup_dbgfs()
1554 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1555 &tc->peers[pidx], &tool_peer_port_fops); in tool_setup_dbgfs()
1558 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1559 &tc->peers[pidx], &tool_peer_link_fops); in tool_setup_dbgfs()
1562 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1563 &tc->peers[pidx], &tool_peer_link_event_fops); in tool_setup_dbgfs()
1565 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) { in tool_setup_dbgfs()
1568 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1569 &tc->peers[pidx].inmws[widx], in tool_setup_dbgfs()
1573 for (widx = 0; widx < tc->peers[pidx].outmw_cnt; widx++) { in tool_setup_dbgfs()
1576 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1577 &tc->peers[pidx].outmws[widx], in tool_setup_dbgfs()
1581 for (sidx = 0; sidx < tc->peers[pidx].outspad_cnt; sidx++) { in tool_setup_dbgfs()
1585 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1586 &tc->peers[pidx].outspads[sidx], in tool_setup_dbgfs()
1590 for (midx = 0; midx < tc->peers[pidx].outmsg_cnt; midx++) { in tool_setup_dbgfs()
1593 tc->peers[pidx].dbgfs_dir, in tool_setup_dbgfs()
1594 &tc->peers[pidx].outmsgs[midx], in tool_setup_dbgfs()