Lines Matching refs:id
172 struct nvme_id_ctrl *id; in nvmet_execute_identify_ctrl() local
175 id = kzalloc(sizeof(*id), GFP_KERNEL); in nvmet_execute_identify_ctrl()
176 if (!id) { in nvmet_execute_identify_ctrl()
182 id->vid = 0; in nvmet_execute_identify_ctrl()
183 id->ssvid = 0; in nvmet_execute_identify_ctrl()
185 memset(id->sn, ' ', sizeof(id->sn)); in nvmet_execute_identify_ctrl()
186 snprintf(id->sn, sizeof(id->sn), "%llx", ctrl->serial); in nvmet_execute_identify_ctrl()
188 memset(id->mn, ' ', sizeof(id->mn)); in nvmet_execute_identify_ctrl()
189 strncpy((char *)id->mn, "Linux", sizeof(id->mn)); in nvmet_execute_identify_ctrl()
191 memset(id->fr, ' ', sizeof(id->fr)); in nvmet_execute_identify_ctrl()
192 strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr)); in nvmet_execute_identify_ctrl()
194 id->rab = 6; in nvmet_execute_identify_ctrl()
202 id->cmic = (1 << 0) | (1 << 1); in nvmet_execute_identify_ctrl()
205 id->mdts = 0; in nvmet_execute_identify_ctrl()
206 id->cntlid = cpu_to_le16(ctrl->cntlid); in nvmet_execute_identify_ctrl()
207 id->ver = cpu_to_le32(ctrl->subsys->ver); in nvmet_execute_identify_ctrl()
210 id->oaes = cpu_to_le32(1 << 8); in nvmet_execute_identify_ctrl()
211 id->ctratt = cpu_to_le32(1 << 0); in nvmet_execute_identify_ctrl()
213 id->oacs = 0; in nvmet_execute_identify_ctrl()
220 id->acl = 3; in nvmet_execute_identify_ctrl()
222 id->aerl = NVMET_ASYNC_EVENTS - 1; in nvmet_execute_identify_ctrl()
225 id->frmw = (1 << 0) | (1 << 1); in nvmet_execute_identify_ctrl()
226 id->lpa = (1 << 0) | (1 << 2); in nvmet_execute_identify_ctrl()
227 id->elpe = NVMET_ERROR_LOG_SLOTS - 1; in nvmet_execute_identify_ctrl()
228 id->npss = 0; in nvmet_execute_identify_ctrl()
231 id->kas = cpu_to_le16(NVMET_KAS); in nvmet_execute_identify_ctrl()
233 id->sqes = (0x6 << 4) | 0x6; in nvmet_execute_identify_ctrl()
234 id->cqes = (0x4 << 4) | 0x4; in nvmet_execute_identify_ctrl()
237 id->maxcmd = cpu_to_le16(NVMET_MAX_CMD); in nvmet_execute_identify_ctrl()
239 id->nn = cpu_to_le32(ctrl->subsys->max_nsid); in nvmet_execute_identify_ctrl()
240 id->oncs = cpu_to_le16(NVME_CTRL_ONCS_DSM); in nvmet_execute_identify_ctrl()
243 id->vwc = NVME_CTRL_VWC_PRESENT; in nvmet_execute_identify_ctrl()
249 id->awun = 0; in nvmet_execute_identify_ctrl()
250 id->awupf = 0; in nvmet_execute_identify_ctrl()
252 id->sgls = cpu_to_le32(1 << 0); /* we always support SGLs */ in nvmet_execute_identify_ctrl()
254 id->sgls |= cpu_to_le32(1 << 2); in nvmet_execute_identify_ctrl()
256 id->sgls |= cpu_to_le32(1 << 20); in nvmet_execute_identify_ctrl()
258 strcpy(id->subnqn, ctrl->subsys->subsysnqn); in nvmet_execute_identify_ctrl()
261 id->ioccsz = cpu_to_le32((sizeof(struct nvme_command) + in nvmet_execute_identify_ctrl()
264 id->iorcsz = cpu_to_le32(sizeof(struct nvme_completion) / 16); in nvmet_execute_identify_ctrl()
266 id->msdbd = ctrl->ops->msdbd; in nvmet_execute_identify_ctrl()
272 id->psd[0].max_power = cpu_to_le16(0x9c4); in nvmet_execute_identify_ctrl()
273 id->psd[0].entry_lat = cpu_to_le32(0x10); in nvmet_execute_identify_ctrl()
274 id->psd[0].exit_lat = cpu_to_le32(0x4); in nvmet_execute_identify_ctrl()
276 status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id)); in nvmet_execute_identify_ctrl()
278 kfree(id); in nvmet_execute_identify_ctrl()
286 struct nvme_id_ns *id; in nvmet_execute_identify_ns() local
295 id = kzalloc(sizeof(*id), GFP_KERNEL); in nvmet_execute_identify_ns()
296 if (!id) { in nvmet_execute_identify_ns()
305 id->ncap = id->nuse = id->nsze = in nvmet_execute_identify_ns()
312 id->nlbaf = 0; in nvmet_execute_identify_ns()
313 id->flbas = 0; in nvmet_execute_identify_ns()
319 id->nmic = (1 << 0); in nvmet_execute_identify_ns()
321 memcpy(&id->nguid, &ns->nguid, sizeof(uuid_le)); in nvmet_execute_identify_ns()
323 id->lbaf[0].ds = ns->blksize_shift; in nvmet_execute_identify_ns()
325 status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id)); in nvmet_execute_identify_ns()
327 kfree(id); in nvmet_execute_identify_ns()