Blob Blame History Raw
From: Keith Busch <keith.busch@intel.com>
Date: Tue, 17 Apr 2018 14:42:44 -0600
Subject: [PATCH] nvme: Set integrity flag for user passthrough commands
References: bsc#1098706
Git-commit: f31a21103c03bb62846409fdc60cc9faf2398cfb
Patch-mainline: v4.17-rc4

If the command a separate metadata buffer attached, the request needs
to have the integrity flag set so the driver knows to map it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ed8e6819cd85..1bddf6b62369 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -766,6 +766,7 @@ static int nvme_submit_user_cmd(struct request_queue *q,
 				ret = PTR_ERR(meta);
 				goto out_unmap;
 			}
+			req->cmd_flags |= REQ_INTEGRITY;
 		}
 	}
 
-- 
2.12.3