Lines Matching +full:wr +full:- +full:active
4 * Copyright (c) 2003-2016 Chelsio Communications, Inc. All rights reserved.
16 * - Redistributions of source code must retain the above
20 * - Redistributions in binary form must reproduce the above
63 (w)->wr.wr_hi = htonl(FW_WR_OP_V(FW_TP_WR) | \
64 FW_WR_IMMDLEN_V(sizeof(*w) - sizeof(w->wr))); \
65 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*w), 16)) | \
67 (w)->wr.wr_lo = cpu_to_be64(0); \
76 (w)->wr.wr_hi = htonl(FW_WR_OP_V(FW_ULPTX_WR) | \
78 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(wrlen, 16)) | \
80 (w)->wr.wr_lo = cpu_to_be64(0); \
103 * and active-open TID tables. The tables themselves are allocated dynamically.
168 tid -= t->tid_base; in lookup_tid()
169 return tid < t->ntids ? t->tid_tab[tid] : NULL; in lookup_tid()
174 return ((tid - t->tid_base) >= t->ntids); in tid_out_of_range()
179 return atid < t->natids ? t->atid_tab[atid].data : NULL; in lookup_atid()
185 if (t->nsftids && (stid >= t->sftid_base)) { in lookup_stid()
186 stid -= t->sftid_base; in lookup_stid()
187 stid += t->nstids; in lookup_stid()
189 stid -= t->stid_base; in lookup_stid()
192 return stid < (t->nstids + t->nsftids) ? t->stid_tab[stid].data : NULL; in lookup_stid()
198 t->tid_tab[tid - t->tid_base] = data; in cxgb4_insert_tid()
199 if (t->hash_base && (tid >= t->hash_base)) { in cxgb4_insert_tid()
201 atomic_add(2, &t->hash_tids_in_use); in cxgb4_insert_tid()
203 atomic_inc(&t->hash_tids_in_use); in cxgb4_insert_tid()
206 atomic_add(2, &t->tids_in_use); in cxgb4_insert_tid()
208 atomic_inc(&t->tids_in_use); in cxgb4_insert_tid()
210 atomic_inc(&t->conns_in_use); in cxgb4_insert_tid()
216 return eotid < t->neotids ? &t->eotid_tab[eotid] : NULL; in cxgb4_lookup_eotid()
223 eotid = find_first_zero_bit(t->eotid_bmap, t->neotids); in cxgb4_get_free_eotid()
224 if (eotid >= t->neotids) in cxgb4_get_free_eotid()
225 eotid = -1; in cxgb4_get_free_eotid()
232 set_bit(eotid, t->eotid_bmap); in cxgb4_alloc_eotid()
233 t->eotid_tab[eotid].data = data; in cxgb4_alloc_eotid()
234 atomic_inc(&t->eotids_in_use); in cxgb4_alloc_eotid()
239 clear_bit(eotid, t->eotid_bmap); in cxgb4_free_eotid()
240 t->eotid_tab[eotid].data = NULL; in cxgb4_free_eotid()
241 atomic_dec(&t->eotids_in_use); in cxgb4_free_eotid()
417 (pci_resource_len((pdev), 2) - roundup_pow_of_two((vres)->ocq.size))
436 unsigned char wr_cred; /* WR 16-byte credits */
458 /* WR */
470 bool write_cmpl_support; /* FW supports WRITE_CMPL WR */