Lines Matching refs:qid
24 int qid; member
45 #define nvme_auth_flags_from_qid(qid) \ argument
46 (qid == 0) ? 0 : BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_RESERVED
47 #define nvme_auth_queue_from_qid(ctrl, qid) \ argument
48 (qid == 0) ? (ctrl)->fabrics_q : (ctrl)->connect_q
50 static int nvme_auth_submit(struct nvme_ctrl *ctrl, int qid, in nvme_auth_submit() argument
54 blk_mq_req_flags_t flags = nvme_auth_flags_from_qid(qid); in nvme_auth_submit()
55 struct request_queue *q = nvme_auth_queue_from_qid(ctrl, qid); in nvme_auth_submit()
71 qid == 0 ? NVME_QID_ANY : qid, in nvme_auth_submit()
75 "qid %d auth_send failed with status %d\n", qid, ret); in nvme_auth_submit()
78 "qid %d auth_send failed with error %d\n", qid, ret); in nvme_auth_submit()
82 static int nvme_auth_receive_validate(struct nvme_ctrl *ctrl, int qid, in nvme_auth_receive_validate() argument
87 __func__, qid, data->auth_type, data->auth_id); in nvme_auth_receive_validate()
97 qid, data->auth_type, data->auth_id); in nvme_auth_receive_validate()
103 qid, le16_to_cpu(data->t_id)); in nvme_auth_receive_validate()
159 chap->qid, data->hashid); in nvme_auth_process_dhchap_challenge()
169 chap->qid, hmac_name); in nvme_auth_process_dhchap_challenge()
184 chap->qid, hmac_name, PTR_ERR(chap->shash_tfm)); in nvme_auth_process_dhchap_challenge()
193 chap->qid, data->hl); in nvme_auth_process_dhchap_challenge()
209 chap->qid, hmac_name); in nvme_auth_process_dhchap_challenge()
216 chap->qid, data->dhgid); in nvme_auth_process_dhchap_challenge()
234 chap->qid, gid_name); in nvme_auth_process_dhchap_challenge()
248 chap->qid); in nvme_auth_process_dhchap_challenge()
259 chap->qid, ret, gid_name); in nvme_auth_process_dhchap_challenge()
265 chap->qid, gid_name); in nvme_auth_process_dhchap_challenge()
269 chap->qid); in nvme_auth_process_dhchap_challenge()
324 __func__, chap->qid, (int)chap->hash_len, chap->c2); in nvme_auth_set_dhchap_reply_data()
332 __func__, chap->qid, in nvme_auth_set_dhchap_reply_data()
358 chap->qid, data->hl); in nvme_auth_process_dhchap_success1()
364 if (chap->qid == 0) in nvme_auth_process_dhchap_success1()
376 __func__, chap->qid, (int)chap->hash_len, data->rval); in nvme_auth_process_dhchap_success1()
378 __func__, chap->qid, (int)chap->hash_len, in nvme_auth_process_dhchap_success1()
382 chap->qid); in nvme_auth_process_dhchap_success1()
388 if (chap->qid == 0) in nvme_auth_process_dhchap_success1()
432 __func__, chap->qid, chap->s1, chap->transaction); in nvme_auth_dhchap_setup_host_response()
444 __func__, chap->qid); in nvme_auth_dhchap_setup_host_response()
451 chap->qid, ret); in nvme_auth_dhchap_setup_host_response()
528 chap->qid, ret); in nvme_auth_dhchap_setup_ctrl_response()
547 __func__, chap->qid, chap->s2, chap->transaction); in nvme_auth_dhchap_setup_ctrl_response()
549 __func__, chap->qid, (int)chap->hash_len, challenge); in nvme_auth_dhchap_setup_ctrl_response()
551 __func__, chap->qid, ctrl->opts->subsysnqn); in nvme_auth_dhchap_setup_ctrl_response()
553 __func__, chap->qid, ctrl->opts->host->nqn); in nvme_auth_dhchap_setup_ctrl_response()
602 "qid %d: reusing host key\n", chap->qid); in nvme_auth_dhchap_exponential()
706 __func__, chap->qid); in __nvme_auth_work()
713 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in __nvme_auth_work()
721 __func__, chap->qid); in __nvme_auth_work()
724 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, chap->buf_size, false); in __nvme_auth_work()
728 chap->qid, ret < 0 ? "error" : "nvme status", ret); in __nvme_auth_work()
732 ret = nvme_auth_receive_validate(ctrl, chap->qid, chap->buf, chap->transaction, in __nvme_auth_work()
750 __func__, chap->qid); in __nvme_auth_work()
759 __func__, chap->qid); in __nvme_auth_work()
768 __func__, chap->qid); in __nvme_auth_work()
776 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in __nvme_auth_work()
784 __func__, chap->qid); in __nvme_auth_work()
787 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, chap->buf_size, false); in __nvme_auth_work()
791 chap->qid, ret < 0 ? "error" : "nvme status", ret); in __nvme_auth_work()
795 ret = nvme_auth_receive_validate(ctrl, chap->qid, in __nvme_auth_work()
807 __func__, chap->qid); in __nvme_auth_work()
825 __func__, chap->qid); in __nvme_auth_work()
827 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in __nvme_auth_work()
838 __func__, chap->qid, chap->status); in __nvme_auth_work()
840 ret = nvme_auth_submit(ctrl, chap->qid, chap->buf, tl, true); in __nvme_auth_work()
849 int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid) in nvme_auth_negotiate() argument
854 dev_warn(ctrl->device, "qid %d: no key\n", qid); in nvme_auth_negotiate()
859 dev_warn(ctrl->device, "qid %d: invalid ctrl key\n", qid); in nvme_auth_negotiate()
867 if (chap->qid == qid) { in nvme_auth_negotiate()
868 dev_dbg(ctrl->device, "qid %d: re-using context\n", qid); in nvme_auth_negotiate()
881 chap->qid = (qid == NVME_QID_ANY) ? 0 : qid; in nvme_auth_negotiate()
904 int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid) in nvme_auth_wait() argument
911 if (chap->qid != qid) in nvme_auth_wait()