Print this page
8368 remove warlock leftovers from usr/src/uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/adapters/hermon/hermon_qp.c
          +++ new/usr/src/uts/common/io/ib/adapters/hermon/hermon_qp.c
↓ open down ↓ 83 lines elided ↑ open up ↑
  84   84          uint32_t                        *sq_buf, *rq_buf;
  85   85          uint32_t                        log_qp_sq_size, log_qp_rq_size;
  86   86          uint32_t                        sq_size, rq_size;
  87   87          uint32_t                        sq_depth, rq_depth;
  88   88          uint32_t                        sq_wqe_size, rq_wqe_size, wqesz_shift;
  89   89          uint32_t                        max_sgl, max_recv_sgl, uarpg;
  90   90          uint_t                          qp_is_umap;
  91   91          uint_t                          qp_srq_en, i, j;
  92   92          int                             status, flag;
  93   93  
  94      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*attr_p, *queuesz_p))
  95      -
  96   94          /*
  97   95           * Extract the necessary info from the hermon_qp_info_t structure
  98   96           */
  99   97          attr_p    = qpinfo->qpi_attrp;
 100   98          type      = qpinfo->qpi_type;
 101   99          ibt_qphdl = qpinfo->qpi_ibt_qphdl;
 102  100          queuesz_p = qpinfo->qpi_queueszp;
 103  101          qpn       = qpinfo->qpi_qpn;
 104  102          qphdl     = &qpinfo->qpi_qphdl;
 105  103          alloc_flags = attr_p->qp_alloc_flags;
↓ open down ↓ 159 lines elided ↑ open up ↑
 265  263           * (i.e. the Hermon Queue Pair handle).  If we fail here, we must
 266  264           * undo the reference counts and the previous resource allocation.
 267  265           */
 268  266          status = hermon_rsrc_alloc(state, HERMON_QPHDL, 1, sleepflag, &rsrc);
 269  267          if (status != DDI_SUCCESS) {
 270  268                  status = IBT_INSUFF_RESOURCE;
 271  269                  goto qpalloc_fail4;
 272  270          }
 273  271          qp = (hermon_qphdl_t)rsrc->hr_addr;
 274  272          bzero(qp, sizeof (struct hermon_sw_qp_s));
 275      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*qp))
 276  273  
 277  274          qp->qp_alloc_flags = alloc_flags;
 278  275  
 279  276          /*
 280  277           * Calculate the QP number from QPC index.  This routine handles
 281  278           * all of the operations necessary to keep track of used, unused,
 282  279           * and released QP numbers.
 283  280           */
 284  281          if (type == IBT_UD_RQP) {
 285  282                  qp->qp_qpnum = qpc->hr_indx;
↓ open down ↓ 593 lines elided ↑ open up ↑
 879  876           */
 880  877          status = hermon_rsrc_alloc(state, HERMON_QPHDL, 1, sleepflag, &rsrc);
 881  878          if (status != DDI_SUCCESS) {
 882  879                  status = IBT_INSUFF_RESOURCE;
 883  880                  goto spec_qpalloc_fail4;
 884  881          }
 885  882          qp = (hermon_qphdl_t)rsrc->hr_addr;
 886  883  
 887  884          bzero(qp, sizeof (struct hermon_sw_qp_s));
 888  885  
 889      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*qp))
 890  886          qp->qp_alloc_flags = attr_p->qp_alloc_flags;
 891  887  
 892  888          /*
 893  889           * Actual QP number is a combination of the index of the QPC and
 894  890           * the port number.  This is because the special QP contexts must
 895  891           * be allocated two-at-a-time.
 896  892           */
 897  893          qp->qp_qpnum = qpc->hr_indx + port;
 898  894          qp->qp_ring = qp->qp_qpnum << 8;
 899  895  
↓ open down ↓ 345 lines elided ↑ open up ↑
1245 1241          uint32_t                        log_qp_sq_size, log_qp_rq_size;
1246 1242          uint32_t                        sq_size, rq_size;
1247 1243          uint32_t                        sq_depth, rq_depth;
1248 1244          uint32_t                        sq_wqe_size, rq_wqe_size, wqesz_shift;
1249 1245          uint32_t                        max_sgl, max_recv_sgl, uarpg;
1250 1246          uint_t                          qp_srq_en, i, j;
1251 1247          int                             ii;     /* loop counter for range */
1252 1248          int                             status, flag;
1253 1249          uint_t                          serv_type;
1254 1250  
1255      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*attr_p, *queuesz_p))
1256      -
1257 1251          /*
1258 1252           * Extract the necessary info from the hermon_qp_info_t structure
1259 1253           */
1260 1254          attr_p    = qpinfo->qpi_attrp;
1261 1255          type      = qpinfo->qpi_type;
1262 1256          queuesz_p = qpinfo->qpi_queueszp;
1263 1257  
1264 1258          if (attr_p->qp_alloc_flags & IBT_QP_USES_RSS) {
1265 1259                  if (log2 > state->hs_ibtfinfo.hca_attr->hca_rss_max_log2_table)
1266 1260                          return (IBT_INSUFF_RESOURCE);
↓ open down ↓ 144 lines elided ↑ open up ↑
1411 1405           * (i.e. the Hermon Queue Pair handle).  If we fail here, we must
1412 1406           * undo the reference counts and the previous resource allocation.
1413 1407           */
1414 1408          status = hermon_rsrc_alloc(state, HERMON_QPHDL, 1, sleepflag, &rsrc);
1415 1409          if (status != DDI_SUCCESS) {
1416 1410                  status = IBT_INSUFF_RESOURCE;
1417 1411                  goto qpalloc_fail4;
1418 1412          }
1419 1413          qp = (hermon_qphdl_t)rsrc->hr_addr;
1420 1414          bzero(qp, sizeof (struct hermon_sw_qp_s));
1421      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*qp))
1422 1415          qp->qp_alloc_flags = attr_p->qp_alloc_flags;
1423 1416  
1424 1417          /*
1425 1418           * Calculate the QP number from QPC index.  This routine handles
1426 1419           * all of the operations necessary to keep track of used, unused,
1427 1420           * and released QP numbers.
1428 1421           */
1429 1422          qp->qp_qpnum = qpc->hr_indx + ii;
1430 1423          qp->qp_ring = qp->qp_qpnum << 8;
1431 1424          qp->qp_qpn_hdl = NULL;
↓ open down ↓ 551 lines elided ↑ open up ↑
1983 1976  
1984 1977          /*
1985 1978           * Drop the QP lock
1986 1979           *    At this point the lock is no longer necessary.  We cannot
1987 1980           *    protect from multiple simultaneous calls to free the same QP.
1988 1981           *    In addition, since the QP lock is contained in the QP "software
1989 1982           *    handle" resource, which we will free (see below), it is
1990 1983           *    important that we have no further references to that memory.
1991 1984           */
1992 1985          mutex_exit(&qp->qp_lock);
1993      -        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*qp))
1994 1986  
1995 1987          /*
1996 1988           * Free the QP resources
1997 1989           *    Start by deregistering and freeing the memory for work queues.
1998 1990           *    Next free any previously allocated context information
1999 1991           *    (depending on QP type)
2000 1992           *    Finally, decrement the necessary reference counts.
2001 1993           * If this fails for any reason, then it is an indication that
2002 1994           * something (either in HW or SW) has gone seriously wrong.  So we
2003 1995           * print a warning message and return.
↓ open down ↓ 218 lines elided ↑ open up ↑
2222 2214                  /* port+1 for port 1/2 */
2223 2215                  ud->ud_port     =
2224 2216                      (uint8_t)(((qpc->pri_addr_path.sched_q >> 6) & 0x01) + 1);
2225 2217  
2226 2218                  attr_p->qp_info.qp_trans = IBT_UD_SRV;
2227 2219  
2228 2220                  if (qp->qp_serv_type == HERMON_QP_FEXCH) {
2229 2221                          ibt_pmr_desc_t *pmr;
2230 2222                          uint64_t heart_beat;
2231 2223  
2232      -                        _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*pmr))
2233 2224                          pmr = &attr_p->qp_query_fexch.fq_uni_mem_desc;
2234 2225                          pmr->pmd_iova = 0;
2235 2226                          pmr->pmd_lkey = pmr->pmd_rkey =
2236 2227                              hermon_fcoib_qpn_to_mkey(state, qp->qp_qpnum);
2237 2228                          pmr->pmd_phys_buf_list_sz =
2238 2229                              state->hs_fcoib.hfc_mtts_per_mpt;
2239 2230                          pmr->pmd_sync_required = 0;
2240 2231  
2241 2232                          pmr = &attr_p->qp_query_fexch.fq_bi_mem_desc;
2242 2233                          pmr->pmd_iova = 0;
↓ open down ↓ 181 lines elided ↑ open up ↑
2424 2415                  /*
2425 2416                   * Allocate and initialize a QPN entry, then insert
2426 2417                   * it into the AVL tree.
2427 2418                   */
2428 2419                  entry = (hermon_qpn_entry_t *)kmem_zalloc(
2429 2420                      sizeof (hermon_qpn_entry_t), KM_NOSLEEP);
2430 2421                  if (entry == NULL) {
2431 2422                          mutex_exit(&state->hs_qpn_avl_lock);
2432 2423                          return (DDI_FAILURE);
2433 2424                  }
2434      -                _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*entry))
2435 2425  
2436 2426                  entry->qpn_indx    = qpc->hr_indx;
2437 2427                  entry->qpn_refcnt  = 0;
2438 2428                  entry->qpn_counter = 0;
2439 2429  
2440 2430                  avl_insert(&state->hs_qpn_avl, entry, where);
2441 2431          }
2442 2432  
2443 2433          /*
2444 2434           * Make the AVL tree entry point to the QP context resource that
↓ open down ↓ 486 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX