• Home
  • Raw
  • Download

Lines Matching refs:ulp_ops

178 static inline void ulp_get(struct cnic_ulp_ops *ulp_ops)  in ulp_get()  argument
180 atomic_inc(&ulp_ops->ref_count); in ulp_get()
183 static inline void ulp_put(struct cnic_ulp_ops *ulp_ops) in ulp_put() argument
185 atomic_dec(&ulp_ops->ref_count); in ulp_put()
325 struct cnic_ulp_ops *ulp_ops; in cnic_send_nlmsg() local
355 ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]); in cnic_send_nlmsg()
356 if (ulp_ops) in cnic_send_nlmsg()
357 rc = ulp_ops->iscsi_nl_send_msg( in cnic_send_nlmsg()
393 if (!rcu_access_pointer(cp->ulp_ops[CNIC_ULP_L4])) { in cnic_iscsi_nl_msg_recv()
473 int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) in cnic_register_driver() argument
497 atomic_set(&ulp_ops->ref_count, 0); in cnic_register_driver()
498 rcu_assign_pointer(cnic_ulp_tbl[ulp_type], ulp_ops); in cnic_register_driver()
507 ulp_ops->cnic_init(dev); in cnic_register_driver()
517 struct cnic_ulp_ops *ulp_ops; in cnic_unregister_driver() local
525 ulp_ops = cnic_ulp_tbl_prot(ulp_type); in cnic_unregister_driver()
526 if (!ulp_ops) { in cnic_unregister_driver()
535 if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { in cnic_unregister_driver()
548 while ((atomic_read(&ulp_ops->ref_count) != 0) && (i < 20)) { in cnic_unregister_driver()
553 if (atomic_read(&ulp_ops->ref_count) != 0) in cnic_unregister_driver()
570 struct cnic_ulp_ops *ulp_ops; in cnic_register_device() local
583 if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { in cnic_register_device()
592 ulp_ops = cnic_ulp_tbl_prot(ulp_type); in cnic_register_device()
593 rcu_assign_pointer(cp->ulp_ops[ulp_type], ulp_ops); in cnic_register_device()
598 ulp_ops->cnic_start(cp->ulp_handle[ulp_type]); in cnic_register_device()
623 if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { in cnic_unregister_device()
624 RCU_INIT_POINTER(cp->ulp_ops[ulp_type], NULL); in cnic_unregister_device()
1426 struct cnic_ulp_ops *ulp_ops; in cnic_reply_bnx2x_kcqes() local
1429 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_reply_bnx2x_kcqes()
1430 if (likely(ulp_ops)) { in cnic_reply_bnx2x_kcqes()
1431 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in cnic_reply_bnx2x_kcqes()
2832 struct cnic_ulp_ops *ulp_ops; in service_kcqes() local
2868 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in service_kcqes()
2869 if (likely(ulp_ops)) { in service_kcqes()
2870 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in service_kcqes()
3186 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_stop_one() local
3192 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_stop_one()
3194 if (!ulp_ops) { in cnic_ulp_stop_one()
3202 ulp_ops->cnic_stop(cp->ulp_handle[if_type]); in cnic_ulp_stop_one()
3222 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_start() local
3225 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_start()
3227 if (!ulp_ops || !ulp_ops->cnic_start) { in cnic_ulp_start()
3235 ulp_ops->cnic_start(cp->ulp_handle[if_type]); in cnic_ulp_start()
3244 struct cnic_ulp_ops *ulp_ops; in cnic_copy_ulp_stats() local
3248 ulp_ops = rcu_dereference_protected(cp->ulp_ops[ulp_type], in cnic_copy_ulp_stats()
3250 if (ulp_ops && ulp_ops->cnic_get_stats) in cnic_copy_ulp_stats()
3251 rc = ulp_ops->cnic_get_stats(cp->ulp_handle[ulp_type]); in cnic_copy_ulp_stats()
3331 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_init() local
3334 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_init()
3335 if (!ulp_ops || !ulp_ops->cnic_init) { in cnic_ulp_init()
3339 ulp_get(ulp_ops); in cnic_ulp_init()
3343 ulp_ops->cnic_init(dev); in cnic_ulp_init()
3345 ulp_put(ulp_ops); in cnic_ulp_init()
3355 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_exit() local
3358 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_exit()
3359 if (!ulp_ops || !ulp_ops->cnic_exit) { in cnic_ulp_exit()
3363 ulp_get(ulp_ops); in cnic_ulp_exit()
3367 ulp_ops->cnic_exit(dev); in cnic_ulp_exit()
3369 ulp_put(ulp_ops); in cnic_ulp_exit()
3909 struct cnic_ulp_ops *ulp_ops; in cnic_cm_upcall() local
3913 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_cm_upcall()
3914 if (ulp_ops) { in cnic_cm_upcall()
3916 ulp_ops->cm_connect_complete(csk); in cnic_cm_upcall()
3918 ulp_ops->cm_close_complete(csk); in cnic_cm_upcall()
3920 ulp_ops->cm_remote_abort(csk); in cnic_cm_upcall()
3922 ulp_ops->cm_abort_complete(csk); in cnic_cm_upcall()
3924 ulp_ops->cm_remote_close(csk); in cnic_cm_upcall()
4340 rcu_assign_pointer(cp->ulp_ops[CNIC_ULP_L4], &cm_ulp_ops); in cnic_cm_open()
5423 RCU_INIT_POINTER(cp->ulp_ops[CNIC_ULP_L4], NULL); in cnic_stop_hw()
5653 struct cnic_ulp_ops *ulp_ops; in cnic_rcv_netevent() local
5657 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_rcv_netevent()
5659 if (!ulp_ops || !ulp_ops->indicate_netevent) { in cnic_rcv_netevent()
5669 ulp_ops->indicate_netevent(ctx, event, vlan_id); in cnic_rcv_netevent()