Lines Matching refs:qid
169 static inline unsigned int sq_idx(unsigned int qid, u32 stride) in sq_idx() argument
171 return qid * 2 * stride; in sq_idx()
174 static inline unsigned int cq_idx(unsigned int qid, u32 stride) in cq_idx() argument
176 return (qid * 2 + 1) * stride; in cq_idx()
203 u16 qid; member
284 struct nvme_queue *nvmeq, int qid) in nvme_dbbuf_init() argument
286 if (!dev->dbbuf_dbs || !qid) in nvme_dbbuf_init()
289 nvmeq->dbbuf_sq_db = &dev->dbbuf_dbs[sq_idx(qid, dev->db_stride)]; in nvme_dbbuf_init()
290 nvmeq->dbbuf_cq_db = &dev->dbbuf_dbs[cq_idx(qid, dev->db_stride)]; in nvme_dbbuf_init()
291 nvmeq->dbbuf_sq_ei = &dev->dbbuf_eis[sq_idx(qid, dev->db_stride)]; in nvme_dbbuf_init()
292 nvmeq->dbbuf_cq_ei = &dev->dbbuf_eis[cq_idx(qid, dev->db_stride)]; in nvme_dbbuf_init()
297 if (!nvmeq->qid) in nvme_dbbuf_free()
526 if (!nvmeq->qid) in nvme_pci_use_sgls()
843 if (nvmeq->qid && sgl_threshold && in nvme_map_data()
987 if (!nvmeq->qid) in nvme_queue_tagset()
989 return nvmeq->dev->tagset.tags[nvmeq->qid - 1]; in nvme_queue_tagset()
1004 if (unlikely(nvme_is_aen_req(nvmeq->qid, command_id))) { in nvme_handle_cqe()
1119 c.delete_queue.qid = cpu_to_le16(id); in adapter_delete_queue()
1124 static int adapter_alloc_cq(struct nvme_dev *dev, u16 qid, in adapter_alloc_cq() argument
1139 c.create_cq.cqid = cpu_to_le16(qid); in adapter_alloc_cq()
1147 static int adapter_alloc_sq(struct nvme_dev *dev, u16 qid, in adapter_alloc_sq() argument
1168 c.create_sq.sqid = cpu_to_le16(qid); in adapter_alloc_sq()
1171 c.create_sq.cqid = cpu_to_le16(qid); in adapter_alloc_sq()
1276 req->tag, nvmeq->qid); in nvme_timeout()
1293 req->tag, nvmeq->qid); in nvme_timeout()
1308 if (!nvmeq->qid || iod->aborted) { in nvme_timeout()
1311 req->tag, nvmeq->qid); in nvme_timeout()
1327 cmd.abort.sqid = cpu_to_le16(nvmeq->qid); in nvme_timeout()
1331 req->tag, nvmeq->qid); in nvme_timeout()
1390 if (!nvmeq->qid && nvmeq->dev->ctrl.admin_q) in nvme_suspend_queue()
1460 int qid) in nvme_alloc_sq_cmds() argument
1464 if (qid && dev->cmb_use_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) { in nvme_alloc_sq_cmds()
1485 static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth) in nvme_alloc_queue() argument
1487 struct nvme_queue *nvmeq = &dev->queues[qid]; in nvme_alloc_queue()
1489 if (dev->ctrl.queue_count > qid) in nvme_alloc_queue()
1492 nvmeq->sqes = qid ? dev->io_sqes : NVME_ADM_SQES; in nvme_alloc_queue()
1499 if (nvme_alloc_sq_cmds(dev, nvmeq, qid)) in nvme_alloc_queue()
1507 nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride]; in nvme_alloc_queue()
1508 nvmeq->qid = qid; in nvme_alloc_queue()
1527 nvme_irq, nvmeq, "nvme%dq%d", nr, nvmeq->qid); in queue_request_irq()
1530 NULL, nvmeq, "nvme%dq%d", nr, nvmeq->qid); in queue_request_irq()
1534 static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid) in nvme_init_queue() argument
1542 nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride]; in nvme_init_queue()
1544 nvme_dbbuf_init(dev, nvmeq, qid); in nvme_init_queue()
1571 static int nvme_create_queue(struct nvme_queue *nvmeq, int qid, bool polled) in nvme_create_queue() argument
1584 vector = dev->num_vecs == 1 ? 0 : qid; in nvme_create_queue()
1588 result = adapter_alloc_cq(dev, qid, nvmeq, vector); in nvme_create_queue()
1592 result = adapter_alloc_sq(dev, qid, nvmeq); in nvme_create_queue()
1603 nvme_init_queue(nvmeq, qid); in nvme_create_queue()
1617 adapter_delete_sq(dev, qid); in nvme_create_queue()
1619 adapter_delete_cq(dev, qid); in nvme_create_queue()
2378 cmd.delete_queue.qid = cpu_to_le16(nvmeq->qid); in nvme_delete_queue()