Skip to content

Commit eb793e2

Browse files
Christoph Hellwigaxboe
authored andcommitted
nvme.h: add NVMe over Fabrics definitions
The NVMe over Fabrics specification defines a protocol interface and related extensions to NVMe that enable operation over network protocols. The NVMe over Fabrics specification has an NVMe Transport binding for each NVMe Transport. This patch adds the fabrics related definitions: - fabric specific command set and error codes - transport addressing and binding definitions - fabrics sgl extensions - controller identification fabrics enhancements - discovery log page definition Signed-off-by: Armen Baloyan <armenx.baloyan@intel.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Jay Freyensee <james.p.freyensee@intel.com> Signed-off-by: Ming Lin <ming.l@ssi.samsung.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 1a353d8 commit eb793e2

File tree

3 files changed

+322
-23
lines changed

3 files changed

+322
-23
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ int nvme_get_features(struct nvme_ctrl *dev, unsigned fid, unsigned nsid,
524524
memset(&c, 0, sizeof(c));
525525
c.features.opcode = nvme_admin_get_features;
526526
c.features.nsid = cpu_to_le32(nsid);
527-
c.features.prp1 = cpu_to_le64(dma_addr);
527+
c.features.dptr.prp1 = cpu_to_le64(dma_addr);
528528
c.features.fid = cpu_to_le32(fid);
529529

530530
ret = __nvme_submit_sync_cmd(dev->admin_q, &c, &cqe, NULL, 0, 0,
@@ -543,7 +543,7 @@ int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword11,
543543

544544
memset(&c, 0, sizeof(c));
545545
c.features.opcode = nvme_admin_set_features;
546-
c.features.prp1 = cpu_to_le64(dma_addr);
546+
c.features.dptr.prp1 = cpu_to_le64(dma_addr);
547547
c.features.fid = cpu_to_le32(fid);
548548
c.features.dword11 = cpu_to_le32(dword11);
549549

drivers/nvme/host/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req,
520520
goto out_unmap;
521521
}
522522

523-
cmnd->rw.prp1 = cpu_to_le64(sg_dma_address(iod->sg));
524-
cmnd->rw.prp2 = cpu_to_le64(iod->first_dma);
523+
cmnd->rw.dptr.prp1 = cpu_to_le64(sg_dma_address(iod->sg));
524+
cmnd->rw.dptr.prp2 = cpu_to_le64(iod->first_dma);
525525
if (blk_integrity_rq(req))
526526
cmnd->rw.metadata = cpu_to_le64(sg_dma_address(&iod->meta_sg));
527527
return BLK_MQ_RQ_QUEUE_OK;

0 commit comments

Comments
 (0)