Lines Matching refs:id_ns
676 struct nvme_id_ns *id_ns;
708 id_ns = mem;
709 (id_ns->dps) ? (protect = 0x01) : (protect = 0);
855 struct nvme_id_ns *id_ns;
887 id_ns = mem;
888 spt = spt_lut[(id_ns->dpc) & 0x07] << 3;
889 (id_ns->dps) ? (protect = 0x01) : (protect = 0);
1169 struct nvme_id_ns *id_ns;
1194 id_ns = mem;
1195 flbas = (id_ns->flbas) & 0x0F;
1196 lba_length = (1 << (id_ns->lbaf[flbas].ds));
1199 __be32 tmp_cap = cpu_to_be32(le64_to_cpu(id_ns->ncap));
1206 __be64 tmp_cap = cpu_to_be64(le64_to_cpu(id_ns->ncap));
1412 static void nvme_trans_fill_read_cap(u8 *response, struct nvme_id_ns *id_ns,
1424 flbas = (id_ns->flbas) & 0x0F;
1425 lba_length = (1 << (id_ns->lbaf[flbas].ds));
1426 rlba = le64_to_cpup(&id_ns->nsze) - 1;
1427 (id_ns->dps) ? (prot_en = 0x01) : (prot_en = 0);
1441 response[12] = (p_type_lut[id_ns->dps & 0x3] << 1) | prot_en;
1778 struct nvme_id_ns *id_ns;
1804 id_ns = mem;
1807 ns->mode_select_num_blocks = le64_to_cpu(id_ns->ncap);
1809 flbas = (id_ns->flbas) & 0x0F;
1811 (1 << (id_ns->lbaf[flbas].ds));
1889 struct nvme_id_ns *id_ns;
1896 /* Loop thru LBAF's in id_ns to match reqd lbaf, put in cdw10 */
1912 id_ns = mem;
1913 flbas = (id_ns->flbas) & 0x0F;
1914 nlbaf = id_ns->nlbaf;
1917 if (ns->mode_select_block_len == (1 << (id_ns->lbaf[i].ds))) {
1927 if (ns->mode_select_num_blocks != le64_to_cpu(id_ns->ncap)) {
2441 struct nvme_id_ns *id_ns;
2465 id_ns = mem;
2472 nvme_trans_fill_read_cap(response, id_ns, cdb16);