Lines Matching defs:token
372 struct bnxt_hwrm_wait_token *token;
374 token = kzalloc(sizeof(*token), GFP_KERNEL);
375 if (!token)
380 token->dst = dst;
381 token->state = BNXT_HWRM_PENDING;
383 token->seq_id = bp->hwrm_cmd_seq++;
384 hlist_add_head_rcu(&token->node, &bp->hwrm_pending_list);
386 token->seq_id = bp->hwrm_cmd_kong_seq++;
389 return token;
393 __hwrm_release_token(struct bnxt *bp, struct bnxt_hwrm_wait_token *token)
395 if (token->dst == BNXT_HWRM_CHNL_CHIMP) {
396 hlist_del_rcu(&token->node);
397 kfree_rcu(token, rcu);
399 kfree(token);
407 struct bnxt_hwrm_wait_token *token;
410 hlist_for_each_entry_rcu(token, &bp->hwrm_pending_list, node) {
411 if (token->seq_id == seq_id) {
412 WRITE_ONCE(token->state, state);
464 struct bnxt_hwrm_wait_token *token = NULL;
506 token = __hwrm_acquire_token(bp, dst);
507 if (!token) {
511 ctx->req->seq_id = cpu_to_le16(token->seq_id);
562 while (READ_ONCE(token->state) < BNXT_HWRM_COMPLETE &&
584 if (READ_ONCE(token->state) != BNXT_HWRM_COMPLETE) {
603 if (token &&
604 READ_ONCE(token->state) == BNXT_HWRM_DEFERRED) {
605 __hwrm_release_token(bp, token);
606 token = NULL;
686 if (token)
687 __hwrm_release_token(bp, token);