Lines Matching refs:peer

131 static void ntb_msit_copy_peer_desc(struct ntb_msit_ctx *nm, int peer)  in ntb_msit_copy_peer_desc()  argument
134 struct ntb_msi_desc *desc = nm->peers[peer].msi_desc; in ntb_msit_copy_peer_desc()
135 int irq_count = nm->peers[peer].num_irqs; in ntb_msit_copy_peer_desc()
138 desc[i].addr_offset = ntb_peer_spad_read(nm->ntb, peer, in ntb_msit_copy_peer_desc()
140 desc[i].data = ntb_peer_spad_read(nm->ntb, peer, 2 * i + 2); in ntb_msit_copy_peer_desc()
144 irq_count, peer); in ntb_msit_copy_peer_desc()
146 complete_all(&nm->peers[peer].init_comp); in ntb_msit_copy_peer_desc()
155 int peer; in ntb_msit_db_event() local
159 for (peer = 0; peer < sizeof(peer_mask) * 8; peer++) { in ntb_msit_db_event()
160 if (!(peer_mask & BIT(peer))) in ntb_msit_db_event()
163 irq_count = ntb_peer_spad_read(nm->ntb, peer, 0); in ntb_msit_db_event()
171 kfree(nm->peers[peer].msi_desc); in ntb_msit_db_event()
172 nm->peers[peer].msi_desc = desc; in ntb_msit_db_event()
173 nm->peers[peer].num_irqs = irq_count; in ntb_msit_db_event()
175 ntb_msit_copy_peer_desc(nm, peer); in ntb_msit_db_event()
186 struct ntb_msit_peer *peer = data; in ntb_msit_dbgfs_trigger() local
188 if (idx >= peer->num_irqs) in ntb_msit_dbgfs_trigger()
191 dev_dbg(&peer->nm->ntb->dev, "trigger irq %llu on peer %u\n", in ntb_msit_dbgfs_trigger()
192 idx, peer->pidx); in ntb_msit_dbgfs_trigger()
194 return ntb_msi_peer_trigger(peer->nm->ntb, peer->pidx, in ntb_msit_dbgfs_trigger()
195 &peer->msi_desc[idx]); in ntb_msit_dbgfs_trigger()
203 struct ntb_msit_peer *peer = data; in ntb_msit_dbgfs_port_get() local
205 *port = ntb_peer_port_number(peer->nm->ntb, peer->pidx); in ntb_msit_dbgfs_port_get()
215 struct ntb_msit_peer *peer = data; in ntb_msit_dbgfs_count_get() local
217 *count = peer->num_irqs; in ntb_msit_dbgfs_count_get()
227 struct ntb_msit_peer *peer = data; in ntb_msit_dbgfs_ready_get() local
229 *ready = try_wait_for_completion(&peer->init_comp); in ntb_msit_dbgfs_ready_get()
236 struct ntb_msit_peer *peer = data; in ntb_msit_dbgfs_ready_set() local
238 return wait_for_completion_interruptible(&peer->init_comp); in ntb_msit_dbgfs_ready_set()