Lines Matching refs:efc
23 int efcport_init(struct efc *efc) in efcport_init() argument
27 spin_lock_init(&efc->lock); in efcport_init()
28 INIT_LIST_HEAD(&efc->vport_list); in efcport_init()
29 efc->hold_frames = false; in efcport_init()
30 spin_lock_init(&efc->pend_frames_lock); in efcport_init()
31 INIT_LIST_HEAD(&efc->pend_frames); in efcport_init()
34 efc->node_pool = mempool_create_kmalloc_pool(EFC_MAX_REMOTE_NODES, in efcport_init()
36 if (!efc->node_pool) { in efcport_init()
37 efc_log_err(efc, "Can't allocate node pool\n"); in efcport_init()
41 efc->node_dma_pool = dma_pool_create("node_dma_pool", &efc->pci->dev, in efcport_init()
43 if (!efc->node_dma_pool) { in efcport_init()
44 efc_log_err(efc, "Can't allocate node dma pool\n"); in efcport_init()
45 mempool_destroy(efc->node_pool); in efcport_init()
49 efc->els_io_pool = mempool_create_kmalloc_pool(EFC_ELS_IO_POOL_SZ, in efcport_init()
51 if (!efc->els_io_pool) { in efcport_init()
52 efc_log_err(efc, "Can't allocate els io pool\n"); in efcport_init()
60 efc_purge_pending(struct efc *efc) in efc_purge_pending() argument
65 spin_lock_irqsave(&efc->pend_frames_lock, flags); in efc_purge_pending()
67 list_for_each_entry_safe(frame, next, &efc->pend_frames, list_entry) { in efc_purge_pending()
69 efc->tt.hw_seq_free(efc, frame); in efc_purge_pending()
72 spin_unlock_irqrestore(&efc->pend_frames_lock, flags); in efc_purge_pending()
75 void efcport_destroy(struct efc *efc) in efcport_destroy() argument
77 efc_purge_pending(efc); in efcport_destroy()
78 mempool_destroy(efc->els_io_pool); in efcport_destroy()
79 mempool_destroy(efc->node_pool); in efcport_destroy()
80 dma_pool_destroy(efc->node_dma_pool); in efcport_destroy()