Lines Matching refs:ulp_ops

171 static inline void ulp_get(struct cnic_ulp_ops *ulp_ops)  in ulp_get()  argument
173 atomic_inc(&ulp_ops->ref_count); in ulp_get()
176 static inline void ulp_put(struct cnic_ulp_ops *ulp_ops) in ulp_put() argument
178 atomic_dec(&ulp_ops->ref_count); in ulp_put()
287 struct cnic_ulp_ops *ulp_ops; in cnic_send_nlmsg() local
317 ulp_ops = rcu_dereference(cnic_ulp_tbl[CNIC_ULP_ISCSI]); in cnic_send_nlmsg()
318 if (ulp_ops) in cnic_send_nlmsg()
319 rc = ulp_ops->iscsi_nl_send_msg( in cnic_send_nlmsg()
356 if (!rcu_dereference(cp->ulp_ops[CNIC_ULP_L4])) { in cnic_iscsi_nl_msg_recv()
436 int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) in cnic_register_driver() argument
460 atomic_set(&ulp_ops->ref_count, 0); in cnic_register_driver()
461 rcu_assign_pointer(cnic_ulp_tbl[ulp_type], ulp_ops); in cnic_register_driver()
470 ulp_ops->cnic_init(dev); in cnic_register_driver()
480 struct cnic_ulp_ops *ulp_ops; in cnic_unregister_driver() local
488 ulp_ops = cnic_ulp_tbl_prot(ulp_type); in cnic_unregister_driver()
489 if (!ulp_ops) { in cnic_unregister_driver()
498 if (rcu_dereference(cp->ulp_ops[ulp_type])) { in cnic_unregister_driver()
511 while ((atomic_read(&ulp_ops->ref_count) != 0) && (i < 20)) { in cnic_unregister_driver()
516 if (atomic_read(&ulp_ops->ref_count) != 0) in cnic_unregister_driver()
532 struct cnic_ulp_ops *ulp_ops; in cnic_register_device() local
545 if (rcu_dereference(cp->ulp_ops[ulp_type])) { in cnic_register_device()
554 ulp_ops = cnic_ulp_tbl_prot(ulp_type); in cnic_register_device()
555 rcu_assign_pointer(cp->ulp_ops[ulp_type], ulp_ops); in cnic_register_device()
560 ulp_ops->cnic_start(cp->ulp_handle[ulp_type]); in cnic_register_device()
579 if (rcu_dereference(cp->ulp_ops[ulp_type])) { in cnic_unregister_device()
580 rcu_assign_pointer(cp->ulp_ops[ulp_type], NULL); in cnic_unregister_device()
1332 struct cnic_ulp_ops *ulp_ops; in cnic_reply_bnx2x_kcqes() local
1335 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_reply_bnx2x_kcqes()
1336 if (likely(ulp_ops)) { in cnic_reply_bnx2x_kcqes()
1337 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in cnic_reply_bnx2x_kcqes()
2602 struct cnic_ulp_ops *ulp_ops; in service_kcqes() local
2638 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in service_kcqes()
2639 if (likely(ulp_ops)) { in service_kcqes()
2640 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in service_kcqes()
2977 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_stop() local
2980 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_stop()
2982 if (!ulp_ops) { in cnic_ulp_stop()
2990 ulp_ops->cnic_stop(cp->ulp_handle[if_type]); in cnic_ulp_stop()
3002 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_start() local
3005 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_start()
3007 if (!ulp_ops || !ulp_ops->cnic_start) { in cnic_ulp_start()
3015 ulp_ops->cnic_start(cp->ulp_handle[if_type]); in cnic_ulp_start()
3067 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_init() local
3070 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_init()
3071 if (!ulp_ops || !ulp_ops->cnic_init) { in cnic_ulp_init()
3075 ulp_get(ulp_ops); in cnic_ulp_init()
3079 ulp_ops->cnic_init(dev); in cnic_ulp_init()
3081 ulp_put(ulp_ops); in cnic_ulp_init()
3091 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_exit() local
3094 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_exit()
3095 if (!ulp_ops || !ulp_ops->cnic_exit) { in cnic_ulp_exit()
3099 ulp_get(ulp_ops); in cnic_ulp_exit()
3103 ulp_ops->cnic_exit(dev); in cnic_ulp_exit()
3105 ulp_put(ulp_ops); in cnic_ulp_exit()
3627 struct cnic_ulp_ops *ulp_ops; in cnic_cm_upcall() local
3631 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_cm_upcall()
3632 if (ulp_ops) { in cnic_cm_upcall()
3634 ulp_ops->cm_connect_complete(csk); in cnic_cm_upcall()
3636 ulp_ops->cm_close_complete(csk); in cnic_cm_upcall()
3638 ulp_ops->cm_remote_abort(csk); in cnic_cm_upcall()
3640 ulp_ops->cm_abort_complete(csk); in cnic_cm_upcall()
3642 ulp_ops->cm_remote_close(csk); in cnic_cm_upcall()
4022 rcu_assign_pointer(cp->ulp_ops[CNIC_ULP_L4], &cm_ulp_ops); in cnic_cm_open()
5096 rcu_assign_pointer(cp->ulp_ops[CNIC_ULP_L4], NULL); in cnic_stop_hw()
5340 struct cnic_ulp_ops *ulp_ops; in cnic_netdev_event() local
5343 ulp_ops = rcu_dereference(cp->ulp_ops[if_type]); in cnic_netdev_event()
5344 if (!ulp_ops || !ulp_ops->indicate_netevent) in cnic_netdev_event()
5349 ulp_ops->indicate_netevent(ctx, event); in cnic_netdev_event()