Lines Matching refs:snic_glob

140 	queue_work(snic_glob->event_q, &snic->link_work);  in snic_handle_link_event()
550 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_probe()
561 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_probe()
572 snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_probe()
597 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_probe()
598 list_add_tail(&snic->list, &snic_glob->snic_list); in snic_probe()
599 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_probe()
768 flush_workqueue(snic_glob->event_q); in snic_remove()
782 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_remove()
784 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_remove()
808 struct snic_global *snic_glob; variable
822 snic_glob = kzalloc(sizeof(*snic_glob), GFP_KERNEL); in snic_global_data_init()
824 if (!snic_glob) { in snic_global_data_init()
846 INIT_LIST_HEAD(&snic_glob->snic_list); in snic_global_data_init()
847 spin_lock_init(&snic_glob->snic_list_lock); in snic_global_data_init()
860 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
873 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
884 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
887 snic_glob->event_q = create_singlethread_workqueue("snic_event_wq"); in snic_global_data_init()
888 if (!snic_glob->event_q) { in snic_global_data_init()
898 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_init()
901 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_init()
904 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_init()
911 kfree(snic_glob); in snic_global_data_init()
912 snic_glob = NULL; in snic_global_data_init()
924 SNIC_BUG_ON(snic_glob == NULL); in snic_global_data_cleanup()
926 destroy_workqueue(snic_glob->event_q); in snic_global_data_cleanup()
927 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_cleanup()
928 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_cleanup()
929 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_cleanup()
938 kfree(snic_glob); in snic_global_data_cleanup()
939 snic_glob = NULL; in snic_global_data_cleanup()