Lines Matching refs:ctrl

27 		nvmet_update_cc(req->sq->ctrl, val);
40 struct nvmet_ctrl *ctrl = req->sq->ctrl;
50 val = ctrl->cap;
59 val = ctrl->subsys->ver;
62 val = ctrl->cc;
65 val = ctrl->csts;
137 static u16 nvmet_install_queue(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
143 u16 mqes = NVME_CAP_MQES(ctrl->cap);
154 if (ctrl->sqs[qid] != NULL) {
162 sqsize, mqes, ctrl->cntlid);
168 old = cmpxchg(&req->sq->ctrl, NULL, ctrl);
176 nvmet_cq_setup(ctrl, req->cq, qid, sqsize + 1);
177 nvmet_sq_setup(ctrl, req->sq, qid, sqsize + 1);
184 if (ctrl->ops->install_queue) {
185 ret = ctrl->ops->install_queue(req->sq);
188 qid, ctrl->cntlid, ret);
189 ctrl->sqs[qid] = NULL;
197 req->sq->ctrl = NULL;
201 static u32 nvmet_connect_result(struct nvmet_ctrl *ctrl)
203 return (u32)ctrl->cntlid |
204 (nvmet_has_auth(ctrl) ? NVME_CONNECT_AUTHREQ_ATR : 0);
211 struct nvmet_ctrl *ctrl = NULL;
250 le32_to_cpu(c->kato), &ctrl);
254 ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;
256 uuid_copy(&ctrl->hostid, &d->hostid);
258 ret = nvmet_setup_auth(ctrl);
261 nvmet_ctrl_put(ctrl);
269 status = nvmet_install_queue(ctrl, req);
271 nvmet_ctrl_put(ctrl);
276 nvmet_is_disc_subsys(ctrl->subsys) ? "discovery" : "nvm",
277 ctrl->cntlid, ctrl->subsys->subsysnqn, ctrl->hostnqn,
278 ctrl->pi_support ? " T10-PI is enabled" : "",
279 nvmet_has_auth(ctrl) ? " with DH-HMAC-CHAP" : "");
280 req->cqe->result.u32 = cpu_to_le32(nvmet_connect_result(ctrl));
291 struct nvmet_ctrl *ctrl;
320 ctrl = nvmet_ctrl_find_get(d->subsysnqn, d->hostnqn,
322 if (!ctrl) {
327 if (unlikely(qid > ctrl->subsys->max_qid)) {
334 status = nvmet_install_queue(ctrl, req);
338 pr_debug("adding queue %d to ctrl %d.\n", qid, ctrl->cntlid);
339 req->cqe->result.u32 = cpu_to_le32(nvmet_connect_result(ctrl));
347 nvmet_ctrl_put(ctrl);