Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-10-15 14:59:59 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-10-15 18:33:18 +0200
commit5af1d19cd591dd28b6a8c603db470fdf4aaccf18 (patch)
tree2910ad44320a8a4210d3f1987db7abcd71a3d0bb
parente42303710c3db0a639621f12f88916cd23d666f1 (diff)
scsi: ipr: Use dma_pool_zalloc() (FATE#326436).
-rw-r--r--patches.arch/scsi-ipr-Use-dma_pool_zalloc.patch43
-rw-r--r--series.conf1
2 files changed, 44 insertions, 0 deletions
diff --git a/patches.arch/scsi-ipr-Use-dma_pool_zalloc.patch b/patches.arch/scsi-ipr-Use-dma_pool_zalloc.patch
new file mode 100644
index 0000000000..3b770e9c63
--- /dev/null
+++ b/patches.arch/scsi-ipr-Use-dma_pool_zalloc.patch
@@ -0,0 +1,43 @@
+From 8b1bb6dcba76b0fceffff77a25e990f30b10d139 Mon Sep 17 00:00:00 2001
+From: Souptick Joarder <jrdr.linux@gmail.com>
+Date: Thu, 8 Mar 2018 18:41:57 +0530
+Subject: [PATCH] scsi: ipr: Use dma_pool_zalloc()
+
+References: FATE#326436
+Patch-mainline: v4.17-rc1
+Git-commit: 8b1bb6dcba76b0fceffff77a25e990f30b10d139
+
+Use dma_pool_zalloc() instead of dma_pool_alloc + memset
+
+Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
+Acked-by: Brian King <brking@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/scsi/ipr.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index 52735162444f..dda1a64ab89c 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -9651,14 +9651,14 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
+ }
+
+ for (i = 0; i < IPR_NUM_CMD_BLKS; i++) {
+- ipr_cmd = dma_pool_alloc(ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr);
++ ipr_cmd = dma_pool_zalloc(ioa_cfg->ipr_cmd_pool,
++ GFP_KERNEL, &dma_addr);
+
+ if (!ipr_cmd) {
+ ipr_free_cmd_blks(ioa_cfg);
+ return -ENOMEM;
+ }
+
+- memset(ipr_cmd, 0, sizeof(*ipr_cmd));
+ ioa_cfg->ipr_cmnd_list[i] = ipr_cmd;
+ ioa_cfg->ipr_cmnd_list_dma[i] = dma_addr;
+
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index d06d27f22f..cb6f8f837b 100644
--- a/series.conf
+++ b/series.conf
@@ -14655,6 +14655,7 @@
patches.drivers/scsi-mpt3sas-clarify-mmio-pointer-types.patch
patches.drivers/scsi-smartpqi-add-in-new-supported-controllers.patch
patches.drivers/scsi-lpfc-use-__raw_writex-on-dpp-copies.patch
+ patches.arch/scsi-ipr-Use-dma_pool_zalloc.patch
patches.drivers/scsi-lpfc-add-missing-unlock-in-wq-full-logic.patch
patches.drivers/scsi-lpfc-code-cleanup-for-128byte-wqe-data-type.patch
patches.drivers/scsi-lpfc-streamline-nvme-initiator-wqe-setup.patch