Lines Matching defs:peers

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