Skip to contentSkip to conversation

nvme: use the DMA_ATTR_NO_WARN attribute

PATCH In review [email protected] 1 participant 1 message Oct 11, 2016 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 68/102 nvme: use the DMA_ATTR_NO_WARN attribute

From: Mauricio Faria de Oliveira <[email protected]>
Subject: nvme: use the DMA_ATTR_NO_WARN attribute

Use the DMA_ATTR_NO_WARN attribute for the dma_map_sg() call of the nvme driver that returns BLK_MQ_RQ_QUEUE_BUSY (not for BLK_MQ_RQ_QUEUE_ERROR).

---

 drivers/nvme/host/pci.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/pci.c renamed from drivers/nvme/host/pci.c~nvme-use-the-dma_attr_no_warn-attribute +2 -1
diff -puN drivers/nvme/host/pci.c~nvme-use-the-dma_attr_no_warn-attribute drivers/nvme/host/pci.c
@@ -515,7 +515,8 @@ static int nvme_map_data(struct nvme_dev
 		goto out;
 
 	ret = BLK_MQ_RQ_QUEUE_BUSY;
-	if (!dma_map_sg(dev->dev, iod->sg, iod->nents, dma_dir))
+	if (!dma_map_sg_attrs(dev->dev, iod->sg, iod->nents, dma_dir,
+				DMA_ATTR_NO_WARN))
 		goto out;
 
 	if (!nvme_setup_prps(dev, req, size))

_