Lines Matching refs:snic_glob
154 queue_work(snic_glob->event_q, &snic->link_work); in snic_handle_link_event()
564 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_probe()
575 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_probe()
586 snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_probe()
611 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_probe()
612 list_add_tail(&snic->list, &snic_glob->snic_list); in snic_probe()
613 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_probe()
782 flush_workqueue(snic_glob->event_q); in snic_remove()
796 spin_lock_irqsave(&snic_glob->snic_list_lock, flags); in snic_remove()
798 spin_unlock_irqrestore(&snic_glob->snic_list_lock, flags); in snic_remove()
822 struct snic_global *snic_glob; variable
836 snic_glob = kzalloc(sizeof(*snic_glob), GFP_KERNEL); in snic_global_data_init()
838 if (!snic_glob) { in snic_global_data_init()
860 INIT_LIST_HEAD(&snic_glob->snic_list); in snic_global_data_init()
861 spin_lock_init(&snic_glob->snic_list_lock); in snic_global_data_init()
874 snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL] = cachep; in snic_global_data_init()
887 snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL] = cachep; in snic_global_data_init()
898 snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep; in snic_global_data_init()
901 snic_glob->event_q = create_singlethread_workqueue("snic_event_wq"); in snic_global_data_init()
902 if (!snic_glob->event_q) { in snic_global_data_init()
912 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_init()
915 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_init()
918 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_init()
925 kfree(snic_glob); in snic_global_data_init()
926 snic_glob = NULL; in snic_global_data_init()
938 SNIC_BUG_ON(snic_glob == NULL); in snic_global_data_cleanup()
940 destroy_workqueue(snic_glob->event_q); in snic_global_data_cleanup()
941 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_TM_CACHE]); in snic_global_data_cleanup()
942 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_MAX_SGL]); in snic_global_data_cleanup()
943 kmem_cache_destroy(snic_glob->req_cache[SNIC_REQ_CACHE_DFLT_SGL]); in snic_global_data_cleanup()
952 kfree(snic_glob); in snic_global_data_cleanup()
953 snic_glob = NULL; in snic_global_data_cleanup()