Lines Matching refs:pidx
482 unsigned char pidx, port, part; in idt_scan_ports() local
502 for (pidx = 0; pidx < ndev->swcfg->port_cnt; pidx++) { in idt_scan_ports()
503 port = ndev->swcfg->ports[pidx]; in idt_scan_ports()
577 static int idt_ntb_peer_port_number(struct ntb_dev *ntb, int pidx) in idt_ntb_peer_port_number() argument
581 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_peer_port_number()
585 return ndev->peers[pidx].port; in idt_ntb_peer_port_number()
638 unsigned char pidx; in idt_init_link() local
646 for (pidx = 0; pidx < ndev->peer_cnt; pidx++) { in idt_init_link()
647 port_mask &= ~BIT(ndev->peers[pidx].port); in idt_init_link()
648 part_mask &= ~BIT(ndev->peers[pidx].part); in idt_init_link()
835 static bool idt_ntb_peer_link_is_up(struct idt_ntb_dev *ndev, int pidx) in idt_ntb_peer_link_is_up() argument
842 port = ndev->peers[pidx].port; in idt_ntb_peer_link_is_up()
861 idt_nt_write(ndev, IDT_NT_NTMTBLADDR, ndev->peers[pidx].part); in idt_ntb_peer_link_is_up()
883 unsigned char pidx; in idt_ntb_link_is_up() local
902 for (pidx = 0; pidx < ndev->peer_cnt; pidx++) { in idt_ntb_link_is_up()
903 if (idt_ntb_peer_link_is_up(ndev, pidx)) in idt_ntb_link_is_up()
904 status |= ((u64)1 << pidx); in idt_ntb_link_is_up()
1130 unsigned char pidx; in idt_init_mws() local
1141 for (pidx = 0; pidx < ndev->peer_cnt; pidx++) { in idt_init_mws()
1142 peer = &ndev->peers[pidx]; in idt_init_mws()
1170 static int idt_ntb_mw_count(struct ntb_dev *ntb, int pidx) in idt_ntb_mw_count() argument
1174 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_mw_count()
1177 return ndev->peers[pidx].mw_cnt; in idt_ntb_mw_count()
1194 static int idt_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int widx, in idt_ntb_mw_get_align() argument
1202 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_mw_get_align()
1205 peer = &ndev->peers[pidx]; in idt_ntb_mw_get_align()
1287 static int idt_ntb_peer_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, in idt_ntb_peer_mw_set_trans() argument
1294 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_peer_mw_set_trans()
1316 data = SET_FIELD(BARSETUP_TPART, data, ndev->peers[pidx].part); in idt_ntb_peer_mw_set_trans()
1331 data = SET_FIELD(LUTUDATA_PART, 0, ndev->peers[pidx].part) | in idt_ntb_peer_mw_set_trans()
1356 static int idt_ntb_peer_mw_clear_trans(struct ntb_dev *ntb, int pidx, in idt_ntb_peer_mw_clear_trans() argument
1362 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_peer_mw_clear_trans()
1751 static u32 idt_ntb_msg_read(struct ntb_dev *ntb, int *pidx, int midx) in idt_ntb_msg_read() argument
1759 if (pidx != NULL) { in idt_ntb_msg_read()
1763 *pidx = ndev->part_idx_map[srcpart]; in idt_ntb_msg_read()
1766 if (*pidx == -EINVAL) in idt_ntb_msg_read()
1767 *pidx = 0; in idt_ntb_msg_read()
1787 static int idt_ntb_peer_msg_write(struct ntb_dev *ntb, int pidx, int midx, in idt_ntb_peer_msg_write() argument
1797 if (pidx < 0 || ndev->peer_cnt <= pidx) in idt_ntb_peer_msg_write()
1802 SET_FIELD(SWPxMSGCTL_PART, 0, ndev->peers[pidx].part); in idt_ntb_peer_msg_write()
2338 unsigned char idx, pidx, cnt; in idt_dbgfs_info_read() local
2423 for (pidx = 0; pidx < ndev->peer_cnt; pidx++) { in idt_dbgfs_info_read()
2426 pidx, ndev->peers[pidx].port); in idt_dbgfs_info_read()
2429 for (idx = 0; idx < ndev->peers[pidx].mw_cnt; idx += cnt) { in idt_dbgfs_info_read()
2430 data = ndev->peers[pidx].mws[idx].type; in idt_dbgfs_info_read()
2442 ndev->peers[pidx].mws[idx].bar); in idt_dbgfs_info_read()
2446 ndev->peers[pidx].mws[idx].addr_align); in idt_dbgfs_info_read()
2450 ndev->peers[pidx].mws[idx].size_align, in idt_dbgfs_info_read()
2451 ndev->peers[pidx].mws[idx].size_max); in idt_dbgfs_info_read()