Commit 69010660 authored by Mauricio Faria de Oliveira's avatar Mauricio Faria de Oliveira Committed by Brad Figg

nvme: use the DMA_ATTR_NO_WARN attribute

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

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).

Link:
http://lkml.kernel.org/r/1470092390-25451-4-git-send-email-mauricfo@linux.vnet.ibm.com
Signed-off-by: Mauricio Faria de Oliveira <mauricfo at
linux.vnet.ibm.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman at linux.vnet.ibm.com>
Cc: Keith Busch <keith.busch at intel.com>
Cc: Jens Axboe <axboe at fb.com>
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Krzysztof Kozlowski <k.kozlowski at samsung.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
(back ported from commit 2b6b535d)
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 0cd611da
......@@ -18,6 +18,7 @@
#include <linux/blk-mq.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/dma-attrs.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/genhd.h>
......@@ -81,6 +82,8 @@ MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes");
static struct workqueue_struct *nvme_workq;
static DEFINE_DMA_ATTRS(nvme_dma_attrs);
struct nvme_dev;
struct nvme_queue;
......@@ -630,7 +633,8 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req,
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,
&nvme_dma_attrs))
goto out;
if (!nvme_setup_prps(dev, req, blk_rq_bytes(req)))
......@@ -2371,6 +2375,9 @@ static int __init nvme_init(void)
result = pci_register_driver(&nvme_driver);
if (result)
goto core_exit;
dma_set_attr(DMA_ATTR_NO_WARN, &nvme_dma_attrs);
return 0;
core_exit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment