Lines Matching refs:pp

46 static struct pkey_index_qp_list *get_pkey_idx_qp_list(struct ib_port_pkey *pp)  in get_pkey_idx_qp_list()  argument
50 struct ib_device *dev = pp->sec->dev; in get_pkey_idx_qp_list()
52 spin_lock(&dev->port_data[pp->port_num].pkey_list_lock); in get_pkey_idx_qp_list()
53 list_for_each_entry (tmp_pkey, &dev->port_data[pp->port_num].pkey_list, in get_pkey_idx_qp_list()
55 if (tmp_pkey->pkey_index == pp->pkey_index) { in get_pkey_idx_qp_list()
60 spin_unlock(&dev->port_data[pp->port_num].pkey_list_lock); in get_pkey_idx_qp_list()
64 static int get_pkey_and_subnet_prefix(struct ib_port_pkey *pp, in get_pkey_and_subnet_prefix() argument
68 struct ib_device *dev = pp->sec->dev; in get_pkey_and_subnet_prefix()
71 ret = ib_get_cached_pkey(dev, pp->port_num, pp->pkey_index, pkey); in get_pkey_and_subnet_prefix()
75 ib_get_cached_subnet_prefix(dev, pp->port_num, subnet_prefix); in get_pkey_and_subnet_prefix()
199 struct ib_port_pkey *pp, *tmp_pp; in check_pkey_qps() local
209 list_for_each_entry(pp, &pkey->qp_list, qp_list) { in check_pkey_qps()
210 if (atomic_read(&pp->sec->error_list_count)) in check_pkey_qps()
215 pp->sec)) { in check_pkey_qps()
216 atomic_inc(&pp->sec->error_list_count); in check_pkey_qps()
217 list_add(&pp->to_error_list, in check_pkey_qps()
224 list_for_each_entry_safe(pp, in check_pkey_qps()
228 mutex_lock(&pp->sec->mutex); in check_pkey_qps()
229 qp_to_error(pp->sec); in check_pkey_qps()
230 list_del(&pp->to_error_list); in check_pkey_qps()
231 atomic_dec(&pp->sec->error_list_count); in check_pkey_qps()
232 comp = pp->sec->destroying; in check_pkey_qps()
233 mutex_unlock(&pp->sec->mutex); in check_pkey_qps()
236 complete(&pp->sec->error_complete); in check_pkey_qps()
243 static int port_pkey_list_insert(struct ib_port_pkey *pp) in port_pkey_list_insert() argument
248 u32 port_num = pp->port_num; in port_pkey_list_insert()
251 if (pp->state != IB_PORT_PKEY_VALID) in port_pkey_list_insert()
254 dev = pp->sec->dev; in port_pkey_list_insert()
256 pkey = get_pkey_idx_qp_list(pp); in port_pkey_list_insert()
272 if (tmp_pkey->pkey_index == pp->pkey_index) { in port_pkey_list_insert()
281 pkey->pkey_index = pp->pkey_index; in port_pkey_list_insert()
291 list_add(&pp->qp_list, &pkey->qp_list); in port_pkey_list_insert()
294 pp->state = IB_PORT_PKEY_LISTED; in port_pkey_list_insert()
302 static void port_pkey_list_remove(struct ib_port_pkey *pp) in port_pkey_list_remove() argument
306 if (pp->state != IB_PORT_PKEY_LISTED) in port_pkey_list_remove()
309 pkey = get_pkey_idx_qp_list(pp); in port_pkey_list_remove()
312 list_del(&pp->qp_list); in port_pkey_list_remove()
318 pp->state = IB_PORT_PKEY_VALID; in port_pkey_list_remove()