Lines Matching refs:t

310 		struct ch_mem_range *t = data;  in cxgb_rdma_ctl()  local
313 if ((t->addr & 7) || (t->len & 7)) in cxgb_rdma_ctl()
315 if (t->mem_id == MEM_CM) in cxgb_rdma_ctl()
317 else if (t->mem_id == MEM_PMRX) in cxgb_rdma_ctl()
319 else if (t->mem_id == MEM_PMTX) in cxgb_rdma_ctl()
325 t3_mc7_bd_read(mem, t->addr / 8, t->len / 8, in cxgb_rdma_ctl()
326 (u64 *) t->buf); in cxgb_rdma_ctl()
503 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_free_atid() local
504 union active_open_entry *p = atid2entry(t, atid); in cxgb3_free_atid()
507 spin_lock_bh(&t->atid_lock); in cxgb3_free_atid()
508 p->next = t->afree; in cxgb3_free_atid()
509 t->afree = p; in cxgb3_free_atid()
510 t->atids_in_use--; in cxgb3_free_atid()
511 spin_unlock_bh(&t->atid_lock); in cxgb3_free_atid()
523 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_free_stid() local
524 union listen_entry *p = stid2entry(t, stid); in cxgb3_free_stid()
526 spin_lock_bh(&t->stid_lock); in cxgb3_free_stid()
527 p->next = t->sfree; in cxgb3_free_stid()
528 t->sfree = p; in cxgb3_free_stid()
529 t->stids_in_use--; in cxgb3_free_stid()
530 spin_unlock_bh(&t->stid_lock); in cxgb3_free_stid()
538 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_insert_tid() local
540 t->tid_tab[tid].client = client; in cxgb3_insert_tid()
541 t->tid_tab[tid].ctx = ctx; in cxgb3_insert_tid()
542 atomic_inc(&t->tids_in_use); in cxgb3_insert_tid()
629 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_remove_tid() local
631 BUG_ON(tid >= t->ntids); in cxgb3_remove_tid()
633 (void)cmpxchg(&t->tid_tab[tid].ctx, ctx, NULL); in cxgb3_remove_tid()
641 t->tid_tab[tid].ctx = NULL; in cxgb3_remove_tid()
645 atomic_dec(&t->tids_in_use); in cxgb3_remove_tid()
654 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_alloc_atid() local
656 spin_lock_bh(&t->atid_lock); in cxgb3_alloc_atid()
657 if (t->afree && in cxgb3_alloc_atid()
658 t->atids_in_use + atomic_read(&t->tids_in_use) + MC5_MIN_TIDS <= in cxgb3_alloc_atid()
659 t->ntids) { in cxgb3_alloc_atid()
660 union active_open_entry *p = t->afree; in cxgb3_alloc_atid()
662 atid = (p - t->atid_tab) + t->atid_base; in cxgb3_alloc_atid()
663 t->afree = p->next; in cxgb3_alloc_atid()
666 t->atids_in_use++; in cxgb3_alloc_atid()
668 spin_unlock_bh(&t->atid_lock); in cxgb3_alloc_atid()
678 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; in cxgb3_alloc_stid() local
680 spin_lock_bh(&t->stid_lock); in cxgb3_alloc_stid()
681 if (t->sfree) { in cxgb3_alloc_stid()
682 union listen_entry *p = t->sfree; in cxgb3_alloc_stid()
684 stid = (p - t->stid_tab) + t->stid_base; in cxgb3_alloc_stid()
685 t->sfree = p->next; in cxgb3_alloc_stid()
688 t->stids_in_use++; in cxgb3_alloc_stid()
690 spin_unlock_bh(&t->stid_lock); in cxgb3_alloc_stid()
799 struct tid_info *t = &(T3C_DATA(dev))->tid_maps; in do_cr() local
803 if (unlikely(tid >= t->ntids)) { in do_cr()
810 t3c_tid = lookup_stid(t, stid); in do_cr()
893 struct tid_info *t = &(T3C_DATA(dev))->tid_maps; in do_act_establish() local
897 if (unlikely(tid >= t->ntids)) { in do_act_establish()
904 t3c_tid = lookup_atid(t, atid); in do_act_establish()
1157 static int init_tid_tabs(struct tid_info *t, unsigned int ntids, in init_tid_tabs() argument
1161 unsigned long size = ntids * sizeof(*t->tid_tab) + in init_tid_tabs()
1162 natids * sizeof(*t->atid_tab) + nstids * sizeof(*t->stid_tab); in init_tid_tabs()
1164 t->tid_tab = kvzalloc(size, GFP_KERNEL); in init_tid_tabs()
1165 if (!t->tid_tab) in init_tid_tabs()
1168 t->stid_tab = (union listen_entry *)&t->tid_tab[ntids]; in init_tid_tabs()
1169 t->atid_tab = (union active_open_entry *)&t->stid_tab[nstids]; in init_tid_tabs()
1170 t->ntids = ntids; in init_tid_tabs()
1171 t->nstids = nstids; in init_tid_tabs()
1172 t->stid_base = stid_base; in init_tid_tabs()
1173 t->sfree = NULL; in init_tid_tabs()
1174 t->natids = natids; in init_tid_tabs()
1175 t->atid_base = atid_base; in init_tid_tabs()
1176 t->afree = NULL; in init_tid_tabs()
1177 t->stids_in_use = t->atids_in_use = 0; in init_tid_tabs()
1178 atomic_set(&t->tids_in_use, 0); in init_tid_tabs()
1179 spin_lock_init(&t->stid_lock); in init_tid_tabs()
1180 spin_lock_init(&t->atid_lock); in init_tid_tabs()
1187 t->stid_tab[nstids - 1].next = &t->stid_tab[nstids]; in init_tid_tabs()
1188 t->sfree = t->stid_tab; in init_tid_tabs()
1192 t->atid_tab[natids - 1].next = &t->atid_tab[natids]; in init_tid_tabs()
1193 t->afree = t->atid_tab; in init_tid_tabs()
1198 static void free_tid_maps(struct tid_info *t) in free_tid_maps() argument
1200 kvfree(t->tid_tab); in free_tid_maps()
1221 struct t3c_data *t; in cxgb3_offload_activate() local
1227 t = kzalloc(sizeof(*t), GFP_KERNEL); in cxgb3_offload_activate()
1228 if (!t) in cxgb3_offload_activate()
1232 if (dev->ctl(dev, GET_TX_MAX_CHUNK, &t->tx_max_chunk) < 0 || in cxgb3_offload_activate()
1233 dev->ctl(dev, GET_MAX_OUTSTANDING_WR, &t->max_wrs) < 0 || in cxgb3_offload_activate()
1246 err = init_tid_tabs(&t->tid_maps, tid_range.num, natids, in cxgb3_offload_activate()
1251 t->mtus = mtutab.mtus; in cxgb3_offload_activate()
1252 t->nmtus = mtutab.size; in cxgb3_offload_activate()
1254 INIT_WORK(&t->tid_release_task, t3_process_tid_release_list); in cxgb3_offload_activate()
1255 spin_lock_init(&t->tid_release_lock); in cxgb3_offload_activate()
1256 INIT_LIST_HEAD(&t->list_node); in cxgb3_offload_activate()
1257 t->dev = dev; in cxgb3_offload_activate()
1260 T3C_DATA(dev) = t; in cxgb3_offload_activate()
1268 t->nofail_skb = alloc_skb(sizeof(struct cpl_tid_release), GFP_KERNEL); in cxgb3_offload_activate()
1269 t->release_list_incomplete = 0; in cxgb3_offload_activate()
1277 kfree(t); in cxgb3_offload_activate()
1291 struct t3c_data *t = T3C_DATA(tdev); in cxgb3_offload_deactivate() local
1298 free_tid_maps(&t->tid_maps); in cxgb3_offload_deactivate()
1305 kfree_skb(t->nofail_skb); in cxgb3_offload_deactivate()
1306 kfree(t); in cxgb3_offload_deactivate()