Lines Matching refs:nic_cb
535 struct hinic_nic_cb *nic_cb; in hinic_hwdev_cb_register() local
541 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_register()
543 nic_cb->handler = handler; in hinic_hwdev_cb_register()
544 nic_cb->handle = handle; in hinic_hwdev_cb_register()
545 nic_cb->cb_state = HINIC_CB_ENABLED; in hinic_hwdev_cb_register()
558 struct hinic_nic_cb *nic_cb; in hinic_hwdev_cb_unregister() local
567 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in hinic_hwdev_cb_unregister()
569 nic_cb->cb_state &= ~HINIC_CB_ENABLED; in hinic_hwdev_cb_unregister()
571 while (nic_cb->cb_state & HINIC_CB_RUNNING) in hinic_hwdev_cb_unregister()
574 nic_cb->handler = NULL; in hinic_hwdev_cb_unregister()
591 struct hinic_nic_cb *nic_cb; in nic_mgmt_msg_handler() local
609 nic_cb = &pfhwdev->nic_cb[cmd_cb]; in nic_mgmt_msg_handler()
611 cb_state = cmpxchg(&nic_cb->cb_state, in nic_mgmt_msg_handler()
615 if (cb_state == HINIC_CB_ENABLED && nic_cb->handler) in nic_mgmt_msg_handler()
616 nic_cb->handler(nic_cb->handle, buf_in, in nic_mgmt_msg_handler()
621 nic_cb->cb_state &= ~HINIC_CB_RUNNING; in nic_mgmt_msg_handler()