Lines Matching refs:snic_glob

148 	queue_work(snic_glob->event_q, &snic->link_work);  in snic_handle_link_event()
583 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_probe()
593 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_probe()
603 snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_probe()
640 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_probe()
641 list_add_tail(&snic->list, &snic_glob->snic_list); in snic_probe()
642 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_probe()
799 flush_workqueue(snic_glob->event_q); in snic_remove()
813 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_remove()
815 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_remove()
839 struct snic_global *snic_glob; variable
853 snic_glob = kzalloc(sizeof(*snic_glob), GFP_KERNEL); in snic_global_data_init()
855 if (!snic_glob) { in snic_global_data_init()
882 INIT_LIST_HEAD(&snic_glob->snic_list); in snic_global_data_init()
883 spin_lock_init(&snic_glob->snic_list_lock); in snic_global_data_init()
896 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
909 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
920 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
923 snic_glob->event_q = create_singlethread_workqueue("snic_event_wq"); in snic_global_data_init()
924 if (!snic_glob->event_q) { in snic_global_data_init()
934 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_init()
937 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_init()
940 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_init()
947 kfree(snic_glob); in snic_global_data_init()
948 snic_glob = NULL; in snic_global_data_init()
960 SNIC_BUG_ON(snic_glob == NULL); in snic_global_data_cleanup()
962 destroy_workqueue(snic_glob->event_q); in snic_global_data_cleanup()
963 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_cleanup()
964 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_cleanup()
965 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_cleanup()
974 kfree(snic_glob); in snic_global_data_cleanup()
975 snic_glob = NULL; in snic_global_data_cleanup()