aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/csiostor
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:24:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:29 -0400
commit7c845eb5e184977d9c7135ae20d012b59f8cc729 (patch)
tree71115a1f8b3528722917faf589171a4c690547ea /drivers/scsi/csiostor
parent8ac41b9dc719b4a5c65a2192988e8199278bb71a (diff)
scsi: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Cc: Dario Ballabio <ballabio_dario@emc.com> Cc: Michael Neuffer <mike@i-Connect.Net> Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com> Cc: Neela Syam Kolli <megaraidlinux@lsi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/csiostor')
-rw-r--r--drivers/scsi/csiostor/csio_wr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
index 4255ce264abf..773da14cfa14 100644
--- a/drivers/scsi/csiostor/csio_wr.c
+++ b/drivers/scsi/csiostor/csio_wr.c
@@ -232,7 +232,7 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize,
232 232
233 q = wrm->q_arr[free_idx]; 233 q = wrm->q_arr[free_idx];
234 234
235 q->vstart = pci_alloc_consistent(hw->pdev, qsz, &q->pstart); 235 q->vstart = pci_zalloc_consistent(hw->pdev, qsz, &q->pstart);
236 if (!q->vstart) { 236 if (!q->vstart) {
237 csio_err(hw, 237 csio_err(hw,
238 "Failed to allocate DMA memory for " 238 "Failed to allocate DMA memory for "
@@ -240,12 +240,6 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize,
240 return -1; 240 return -1;
241 } 241 }
242 242
243 /*
244 * We need to zero out the contents, importantly for ingress,
245 * since we start with a generatiom bit of 1 for ingress.
246 */
247 memset(q->vstart, 0, qsz);
248
249 q->type = type; 243 q->type = type;
250 q->owner = owner; 244 q->owner = owner;
251 q->pidx = q->cidx = q->inc_idx = 0; 245 q->pidx = q->cidx = q->inc_idx = 0;