Lines Matching refs:qp_table
198 return qp->qpn >= dev->qp_table.sqp_start && in is_sqp()
199 qp->qpn <= dev->qp_table.sqp_start + 3; in is_sqp()
204 return qp->qpn >= dev->qp_table.sqp_start && in is_qp0()
205 qp->qpn <= dev->qp_table.sqp_start + 1; in is_qp0()
244 spin_lock(&dev->qp_table.lock); in mthca_qp_event()
245 qp = mthca_array_get(&dev->qp_table.qp, qpn & (dev->limits.num_qps - 1)); in mthca_qp_event()
248 spin_unlock(&dev->qp_table.lock); in mthca_qp_event()
265 spin_lock(&dev->qp_table.lock); in mthca_qp_event()
268 spin_unlock(&dev->qp_table.lock); in mthca_qp_event()
770 cpu_to_be32(dev->qp_table.rdb_base + in __mthca_modify_qp()
772 dev->qp_table.rdb_shift)); in __mthca_modify_qp()
912 attr->max_dest_rd_atomic > 1 << dev->qp_table.rdb_shift) { in mthca_modify_qp()
914 attr->max_dest_rd_atomic, 1 << dev->qp_table.rdb_shift); in mthca_modify_qp()
1098 ret = mthca_table_get(dev, dev->qp_table.qp_table, qp->qpn); in mthca_map_memfree()
1102 ret = mthca_table_get(dev, dev->qp_table.eqp_table, qp->qpn); in mthca_map_memfree()
1106 ret = mthca_table_get(dev, dev->qp_table.rdb_table, in mthca_map_memfree()
1107 qp->qpn << dev->qp_table.rdb_shift); in mthca_map_memfree()
1116 mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); in mthca_map_memfree()
1119 mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); in mthca_map_memfree()
1127 mthca_table_put(dev, dev->qp_table.rdb_table, in mthca_unmap_memfree()
1128 qp->qpn << dev->qp_table.rdb_shift); in mthca_unmap_memfree()
1129 mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); in mthca_unmap_memfree()
1130 mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); in mthca_unmap_memfree()
1314 qp->qpn = mthca_alloc(&dev->qp_table.alloc); in mthca_alloc_qp()
1324 mthca_free(&dev->qp_table.alloc, qp->qpn); in mthca_alloc_qp()
1328 spin_lock_irq(&dev->qp_table.lock); in mthca_alloc_qp()
1329 mthca_array_set(&dev->qp_table.qp, in mthca_alloc_qp()
1331 spin_unlock_irq(&dev->qp_table.lock); in mthca_alloc_qp()
1377 u32 mqpn = qpn * 2 + dev->qp_table.sqp_start + port - 1; in mthca_alloc_sqp()
1392 spin_lock_irq(&dev->qp_table.lock); in mthca_alloc_sqp()
1393 if (mthca_array_get(&dev->qp_table.qp, mqpn)) in mthca_alloc_sqp()
1396 mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp); in mthca_alloc_sqp()
1397 spin_unlock_irq(&dev->qp_table.lock); in mthca_alloc_sqp()
1422 spin_lock(&dev->qp_table.lock); in mthca_alloc_sqp()
1423 mthca_array_clear(&dev->qp_table.qp, mqpn); in mthca_alloc_sqp()
1424 spin_unlock(&dev->qp_table.lock); in mthca_alloc_sqp()
1438 spin_lock_irq(&dev->qp_table.lock); in get_qp_refcount()
1440 spin_unlock_irq(&dev->qp_table.lock); in get_qp_refcount()
1460 spin_lock(&dev->qp_table.lock); in mthca_free_qp()
1461 mthca_array_clear(&dev->qp_table.qp, in mthca_free_qp()
1464 spin_unlock(&dev->qp_table.lock); in mthca_free_qp()
1496 mthca_free(&dev->qp_table.alloc, qp->qpn); in mthca_free_qp()
2265 spin_lock_init(&dev->qp_table.lock); in mthca_init_qp_table()
2271 dev->qp_table.sqp_start = (dev->limits.reserved_qps + 1) & ~1UL; in mthca_init_qp_table()
2272 err = mthca_alloc_init(&dev->qp_table.alloc, in mthca_init_qp_table()
2275 dev->qp_table.sqp_start + in mthca_init_qp_table()
2280 err = mthca_array_init(&dev->qp_table.qp, in mthca_init_qp_table()
2283 mthca_alloc_cleanup(&dev->qp_table.alloc); in mthca_init_qp_table()
2289 dev->qp_table.sqp_start + i * 2); in mthca_init_qp_table()
2302 mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps); in mthca_init_qp_table()
2303 mthca_alloc_cleanup(&dev->qp_table.alloc); in mthca_init_qp_table()
2315 mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps); in mthca_cleanup_qp_table()
2316 mthca_alloc_cleanup(&dev->qp_table.alloc); in mthca_cleanup_qp_table()