[PATCH 5/5] UBUNTU: SAUCE: nvme: Fix erroneous parameter to dma_map_sg_attrs()

Tim Gardner tim.gardner at canonical.com
Wed Nov 16 14:35:56 UTC 2016


BugLink: http://bugs.launchpad.net/bugs/1637565

Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 drivers/nvme/host/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5256448..3931ceb 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -623,6 +623,7 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req,
 	enum dma_data_direction dma_dir = rq_data_dir(req) ?
 			DMA_TO_DEVICE : DMA_FROM_DEVICE;
 	int ret = BLK_MQ_RQ_QUEUE_ERROR;
+	DEFINE_DMA_ATTRS(attrs);
 
 	sg_init_table(iod->sg, req->nr_phys_segments);
 	iod->nents = blk_rq_map_sg(q, req, iod->sg);
@@ -631,7 +632,7 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req,
 
 	ret = BLK_MQ_RQ_QUEUE_BUSY;
 	if (!dma_map_sg_attrs(dev->dev, iod->sg, iod->nents, dma_dir,
-				DMA_ATTR_NO_WARN))
+				&attrs))
 		goto out;
 
 	if (!nvme_setup_prps(dev, req, blk_rq_bytes(req)))
-- 
2.7.4





More information about the kernel-team mailing list