• 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()
1428 struct cnic_ulp_ops *ulp_ops; in cnic_reply_bnx2x_kcqes() local
1431 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_reply_bnx2x_kcqes()
1432 if (likely(ulp_ops)) { in cnic_reply_bnx2x_kcqes()
1433 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in cnic_reply_bnx2x_kcqes()
2834 struct cnic_ulp_ops *ulp_ops; in service_kcqes() local
2870 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in service_kcqes()
2871 if (likely(ulp_ops)) { in service_kcqes()
2872 ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], in service_kcqes()
3188 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_stop_one() local
3194 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_stop_one()
3196 if (!ulp_ops) { in cnic_ulp_stop_one()
3204 ulp_ops->cnic_stop(cp->ulp_handle[if_type]); in cnic_ulp_stop_one()
3224 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_start() local
3227 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_ulp_start()
3229 if (!ulp_ops || !ulp_ops->cnic_start) { in cnic_ulp_start()
3237 ulp_ops->cnic_start(cp->ulp_handle[if_type]); in cnic_ulp_start()
3246 struct cnic_ulp_ops *ulp_ops; in cnic_copy_ulp_stats() local
3250 ulp_ops = rcu_dereference_protected(cp->ulp_ops[ulp_type], in cnic_copy_ulp_stats()
3252 if (ulp_ops && ulp_ops->cnic_get_stats) in cnic_copy_ulp_stats()
3253 rc = ulp_ops->cnic_get_stats(cp->ulp_handle[ulp_type]); in cnic_copy_ulp_stats()
3333 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_init() local
3336 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_init()
3337 if (!ulp_ops || !ulp_ops->cnic_init) { in cnic_ulp_init()
3341 ulp_get(ulp_ops); in cnic_ulp_init()
3345 ulp_ops->cnic_init(dev); in cnic_ulp_init()
3347 ulp_put(ulp_ops); in cnic_ulp_init()
3357 struct cnic_ulp_ops *ulp_ops; in cnic_ulp_exit() local
3360 ulp_ops = cnic_ulp_tbl_prot(i); in cnic_ulp_exit()
3361 if (!ulp_ops || !ulp_ops->cnic_exit) { in cnic_ulp_exit()
3365 ulp_get(ulp_ops); in cnic_ulp_exit()
3369 ulp_ops->cnic_exit(dev); in cnic_ulp_exit()
3371 ulp_put(ulp_ops); in cnic_ulp_exit()
3911 struct cnic_ulp_ops *ulp_ops; in cnic_cm_upcall() local
3915 ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); in cnic_cm_upcall()
3916 if (ulp_ops) { in cnic_cm_upcall()
3918 ulp_ops->cm_connect_complete(csk); in cnic_cm_upcall()
3920 ulp_ops->cm_close_complete(csk); in cnic_cm_upcall()
3922 ulp_ops->cm_remote_abort(csk); in cnic_cm_upcall()
3924 ulp_ops->cm_abort_complete(csk); in cnic_cm_upcall()
3926 ulp_ops->cm_remote_close(csk); in cnic_cm_upcall()
4343 rcu_assign_pointer(cp->ulp_ops[CNIC_ULP_L4], &cm_ulp_ops); in cnic_cm_open()
5426 RCU_INIT_POINTER(cp->ulp_ops[CNIC_ULP_L4], NULL); in cnic_stop_hw()
5656 struct cnic_ulp_ops *ulp_ops; in cnic_rcv_netevent() local
5660 ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], in cnic_rcv_netevent()
5662 if (!ulp_ops || !ulp_ops->indicate_netevent) { in cnic_rcv_netevent()
5672 ulp_ops->indicate_netevent(ctx, event, vlan_id); in cnic_rcv_netevent()