Lines Matching defs:peers

222  * Wrapper structure is used to distinguish the outbound MW peers reference
264 struct tool_peer *peers;
451 tc->peers = devm_kcalloc(&tc->ntb->dev, tc->peer_cnt,
452 sizeof(*tc->peers), GFP_KERNEL);
453 if (tc->peers == NULL)
457 tc->peers[pidx].pidx = pidx;
458 tc->peers[pidx].tc = tc;
580 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx];
611 tc->peers[pidx].dbgfs_dir, inmw,
628 struct tool_mw *inmw = &tc->peers[pidx].inmws[widx];
843 tc->peers[pidx].dbgfs_dir, outmw,
984 tc->peers[pidx].inmw_cnt = ntb_mw_count(tc->ntb, pidx);
985 tc->peers[pidx].inmws =
986 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].inmw_cnt,
987 sizeof(*tc->peers[pidx].inmws), GFP_KERNEL);
988 if (tc->peers[pidx].inmws == NULL)
991 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) {
992 tc->peers[pidx].inmws[widx].widx = widx;
993 tc->peers[pidx].inmws[widx].pidx = pidx;
994 tc->peers[pidx].inmws[widx].tc = tc;
997 tc->peers[pidx].outmw_cnt = ntb_peer_mw_count(tc->ntb);
998 tc->peers[pidx].outmws =
999 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outmw_cnt,
1000 sizeof(*tc->peers[pidx].outmws), GFP_KERNEL);
1001 if (tc->peers[pidx].outmws == NULL)
1004 for (widx = 0; widx < tc->peers[pidx].outmw_cnt; widx++) {
1005 tc->peers[pidx].outmws[widx].pidx = pidx;
1006 tc->peers[pidx].outmws[widx].mw = &tc->outmws[widx];
1023 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++)
1259 tc->peers[pidx].outspad_cnt = ntb_spad_count(tc->ntb);
1260 tc->peers[pidx].outspads =
1261 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outspad_cnt,
1262 sizeof(*tc->peers[pidx].outspads), GFP_KERNEL);
1263 if (tc->peers[pidx].outspads == NULL)
1266 for (sidx = 0; sidx < tc->peers[pidx].outspad_cnt; sidx++) {
1267 tc->peers[pidx].outspads[sidx].sidx = sidx;
1268 tc->peers[pidx].outspads[sidx].pidx = pidx;
1269 tc->peers[pidx].outspads[sidx].tc = tc;
1423 tc->peers[pidx].outmsg_cnt = ntb_msg_count(tc->ntb);
1424 tc->peers[pidx].outmsgs =
1425 devm_kcalloc(&tc->ntb->dev, tc->peers[pidx].outmsg_cnt,
1426 sizeof(*tc->peers[pidx].outmsgs), GFP_KERNEL);
1427 if (tc->peers[pidx].outmsgs == NULL)
1430 for (midx = 0; midx < tc->peers[pidx].outmsg_cnt; midx++) {
1431 tc->peers[pidx].outmsgs[midx].midx = midx;
1432 tc->peers[pidx].outmsgs[midx].pidx = pidx;
1433 tc->peers[pidx].outmsgs[midx].tc = tc;
1559 tc->peers[pidx].dbgfs_dir =
1563 tc->peers[pidx].dbgfs_dir,
1564 &tc->peers[pidx], &tool_peer_port_fops);
1567 tc->peers[pidx].dbgfs_dir,
1568 &tc->peers[pidx], &tool_peer_link_fops);
1571 tc->peers[pidx].dbgfs_dir,
1572 &tc->peers[pidx], &tool_peer_link_event_fops);
1574 for (widx = 0; widx < tc->peers[pidx].inmw_cnt; widx++) {
1577 tc->peers[pidx].dbgfs_dir,
1578 &tc->peers[pidx].inmws[widx],
1582 for (widx = 0; widx < tc->peers[pidx].outmw_cnt; widx++) {
1585 tc->peers[pidx].dbgfs_dir,
1586 &tc->peers[pidx].outmws[widx],
1590 for (sidx = 0; sidx < tc->peers[pidx].outspad_cnt; sidx++) {
1594 tc->peers[pidx].dbgfs_dir,
1595 &tc->peers[pidx].outspads[sidx],
1599 for (midx = 0; midx < tc->peers[pidx].outmsg_cnt; midx++) {
1602 tc->peers[pidx].dbgfs_dir,
1603 &tc->peers[pidx].outmsgs[midx],