Skip to content

Commit

Permalink
nvme-pci: fix psdt field for single segment sgls
Browse files Browse the repository at this point in the history
The shortcut for single segment SGL requests did not set the PSDT field
to mark the request as using SGLs.

Fixes: 2979105 ("nvme-pci: optimize mapping single segment requests using SGLs")
Signed-off-by: Klaus Birkelund Jensen <klaus.jensen@cnexlabs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Klaus Birkelund Jensen authored and Christoph Hellwig committed May 1, 2019
1 parent 592b6e7 commit 049bf37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ static blk_status_t nvme_setup_sgl_simple(struct nvme_dev *dev,
return BLK_STS_RESOURCE;
iod->dma_len = bv->bv_len;

cmnd->flags = NVME_CMD_SGL_METABUF;
cmnd->dptr.sgl.addr = cpu_to_le64(iod->first_dma);
cmnd->dptr.sgl.length = cpu_to_le32(iod->dma_len);
cmnd->dptr.sgl.type = NVME_SGL_FMT_DATA_DESC << 4;
Expand Down

0 comments on commit 049bf37

Please sign in to comment.