summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/3w-sas.c5
-rw-r--r--drivers/scsi/a100u2w.c8
-rw-r--r--drivers/scsi/arcmsr/arcmsr_hba.c18
-rw-r--r--drivers/scsi/be2iscsi/be_main.c4
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c11
-rw-r--r--drivers/scsi/bfa/bfad_bsg.c6
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c49
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_tgt.c44
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c8
-rw-r--r--drivers/scsi/csiostor/csio_wr.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c14
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c6
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c15
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c15
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c26
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c5
-rw-r--r--drivers/scsi/mesh.c5
-rw-r--r--drivers/scsi/mvumi.c9
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c4
-rw-r--r--drivers/scsi/qedf/qedf_main.c29
-rw-r--r--drivers/scsi/qedi/qedi_main.c39
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_bsg.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c14
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c8
-rw-r--r--drivers/scsi/qla4xxx/ql4_init.c4
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c18
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c4
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c10
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c32
31 files changed, 220 insertions, 206 deletions
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index e8f5f7c63190..cd096104bcec 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -646,8 +646,9 @@ static int twl_allocate_memory(TW_Device_Extension *tw_dev, int size, int which)
646 unsigned long *cpu_addr; 646 unsigned long *cpu_addr;
647 int retval = 1; 647 int retval = 1;
648 648
649 cpu_addr = dma_zalloc_coherent(&tw_dev->tw_pci_dev->dev, 649 cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev,
650 size * TW_Q_LENGTH, &dma_handle, GFP_KERNEL); 650 size * TW_Q_LENGTH, &dma_handle,
651 GFP_KERNEL);
651 if (!cpu_addr) { 652 if (!cpu_addr) {
652 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x5, "Memory allocation failed"); 653 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x5, "Memory allocation failed");
653 goto out; 654 goto out;
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index ff53fd0d12f2..66c514310f3c 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1123,8 +1123,8 @@ static int inia100_probe_one(struct pci_dev *pdev,
1123 1123
1124 /* Get total memory needed for SCB */ 1124 /* Get total memory needed for SCB */
1125 sz = ORC_MAXQUEUE * sizeof(struct orc_scb); 1125 sz = ORC_MAXQUEUE * sizeof(struct orc_scb);
1126 host->scb_virt = dma_zalloc_coherent(&pdev->dev, sz, &host->scb_phys, 1126 host->scb_virt = dma_alloc_coherent(&pdev->dev, sz, &host->scb_phys,
1127 GFP_KERNEL); 1127 GFP_KERNEL);
1128 if (!host->scb_virt) { 1128 if (!host->scb_virt) {
1129 printk("inia100: SCB memory allocation error\n"); 1129 printk("inia100: SCB memory allocation error\n");
1130 goto out_host_put; 1130 goto out_host_put;
@@ -1132,8 +1132,8 @@ static int inia100_probe_one(struct pci_dev *pdev,
1132 1132
1133 /* Get total memory needed for ESCB */ 1133 /* Get total memory needed for ESCB */
1134 sz = ORC_MAXQUEUE * sizeof(struct orc_extended_scb); 1134 sz = ORC_MAXQUEUE * sizeof(struct orc_extended_scb);
1135 host->escb_virt = dma_zalloc_coherent(&pdev->dev, sz, &host->escb_phys, 1135 host->escb_virt = dma_alloc_coherent(&pdev->dev, sz, &host->escb_phys,
1136 GFP_KERNEL); 1136 GFP_KERNEL);
1137 if (!host->escb_virt) { 1137 if (!host->escb_virt) {
1138 printk("inia100: ESCB memory allocation error\n"); 1138 printk("inia100: ESCB memory allocation error\n");
1139 goto out_free_scb_array; 1139 goto out_free_scb_array;
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 0f6751b0a633..57c6fa388bf6 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -587,8 +587,10 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb)
587 case ACB_ADAPTER_TYPE_B: { 587 case ACB_ADAPTER_TYPE_B: {
588 struct MessageUnit_B *reg; 588 struct MessageUnit_B *reg;
589 acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_B), 32); 589 acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_B), 32);
590 dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, 590 dma_coherent = dma_alloc_coherent(&pdev->dev,
591 &dma_coherent_handle, GFP_KERNEL); 591 acb->roundup_ccbsize,
592 &dma_coherent_handle,
593 GFP_KERNEL);
592 if (!dma_coherent) { 594 if (!dma_coherent) {
593 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); 595 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no);
594 return false; 596 return false;
@@ -617,8 +619,10 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb)
617 struct MessageUnit_D *reg; 619 struct MessageUnit_D *reg;
618 620
619 acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_D), 32); 621 acb->roundup_ccbsize = roundup(sizeof(struct MessageUnit_D), 32);
620 dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, 622 dma_coherent = dma_alloc_coherent(&pdev->dev,
621 &dma_coherent_handle, GFP_KERNEL); 623 acb->roundup_ccbsize,
624 &dma_coherent_handle,
625 GFP_KERNEL);
622 if (!dma_coherent) { 626 if (!dma_coherent) {
623 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); 627 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no);
624 return false; 628 return false;
@@ -659,8 +663,10 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb)
659 uint32_t completeQ_size; 663 uint32_t completeQ_size;
660 completeQ_size = sizeof(struct deliver_completeQ) * ARCMSR_MAX_HBE_DONEQUEUE + 128; 664 completeQ_size = sizeof(struct deliver_completeQ) * ARCMSR_MAX_HBE_DONEQUEUE + 128;
661 acb->roundup_ccbsize = roundup(completeQ_size, 32); 665 acb->roundup_ccbsize = roundup(completeQ_size, 32);
662 dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->roundup_ccbsize, 666 dma_coherent = dma_alloc_coherent(&pdev->dev,
663 &dma_coherent_handle, GFP_KERNEL); 667 acb->roundup_ccbsize,
668 &dma_coherent_handle,
669 GFP_KERNEL);
664 if (!dma_coherent){ 670 if (!dma_coherent){
665 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); 671 pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no);
666 return false; 672 return false;
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 39f3820572b4..74e260027c7d 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -3321,8 +3321,8 @@ static int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q,
3321 q->len = len; 3321 q->len = len;
3322 q->entry_size = entry_size; 3322 q->entry_size = entry_size;
3323 mem->size = len * entry_size; 3323 mem->size = len * entry_size;
3324 mem->va = dma_zalloc_coherent(&phba->pcidev->dev, mem->size, &mem->dma, 3324 mem->va = dma_alloc_coherent(&phba->pcidev->dev, mem->size, &mem->dma,
3325 GFP_KERNEL); 3325 GFP_KERNEL);
3326 if (!mem->va) 3326 if (!mem->va)
3327 return -ENOMEM; 3327 return -ENOMEM;
3328 return 0; 3328 return 0;
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index ca7b7bbc8371..d4febaadfaa3 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -293,8 +293,8 @@ static int beiscsi_prep_nemb_cmd(struct beiscsi_hba *phba,
293 struct be_dma_mem *cmd, 293 struct be_dma_mem *cmd,
294 u8 subsystem, u8 opcode, u32 size) 294 u8 subsystem, u8 opcode, u32 size)
295{ 295{
296 cmd->va = dma_zalloc_coherent(&phba->ctrl.pdev->dev, size, &cmd->dma, 296 cmd->va = dma_alloc_coherent(&phba->ctrl.pdev->dev, size, &cmd->dma,
297 GFP_KERNEL); 297 GFP_KERNEL);
298 if (!cmd->va) { 298 if (!cmd->va) {
299 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, 299 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
300 "BG_%d : Failed to allocate memory for if info\n"); 300 "BG_%d : Failed to allocate memory for if info\n");
@@ -1510,10 +1510,9 @@ int beiscsi_mgmt_invalidate_icds(struct beiscsi_hba *phba,
1510 return -EINVAL; 1510 return -EINVAL;
1511 1511
1512 nonemb_cmd.size = sizeof(union be_invldt_cmds_params); 1512 nonemb_cmd.size = sizeof(union be_invldt_cmds_params);
1513 nonemb_cmd.va = dma_zalloc_coherent(&phba->ctrl.pdev->dev, 1513 nonemb_cmd.va = dma_alloc_coherent(&phba->ctrl.pdev->dev,
1514 nonemb_cmd.size, 1514 nonemb_cmd.size, &nonemb_cmd.dma,
1515 &nonemb_cmd.dma, 1515 GFP_KERNEL);
1516 GFP_KERNEL);
1517 if (!nonemb_cmd.va) { 1516 if (!nonemb_cmd.va) {
1518 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH, 1517 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
1519 "BM_%d : invldt_cmds_params alloc failed\n"); 1518 "BM_%d : invldt_cmds_params alloc failed\n");
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 5d163ca1b366..d8e6d7480f35 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3264,9 +3264,9 @@ bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf,
3264 /* Allocate dma coherent memory */ 3264 /* Allocate dma coherent memory */
3265 buf_info = buf_base; 3265 buf_info = buf_base;
3266 buf_info->size = payload_len; 3266 buf_info->size = payload_len;
3267 buf_info->virt = dma_zalloc_coherent(&bfad->pcidev->dev, 3267 buf_info->virt = dma_alloc_coherent(&bfad->pcidev->dev,
3268 buf_info->size, &buf_info->phys, 3268 buf_info->size, &buf_info->phys,
3269 GFP_KERNEL); 3269 GFP_KERNEL);
3270 if (!buf_info->virt) 3270 if (!buf_info->virt)
3271 goto out_free_mem; 3271 goto out_free_mem;
3272 3272
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index e8ae4d671d23..039328d9ef13 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -1857,10 +1857,10 @@ int bnx2fc_setup_task_ctx(struct bnx2fc_hba *hba)
1857 * entries. Hence the limit with one page is 8192 task context 1857 * entries. Hence the limit with one page is 8192 task context
1858 * entries. 1858 * entries.
1859 */ 1859 */
1860 hba->task_ctx_bd_tbl = dma_zalloc_coherent(&hba->pcidev->dev, 1860 hba->task_ctx_bd_tbl = dma_alloc_coherent(&hba->pcidev->dev,
1861 PAGE_SIZE, 1861 PAGE_SIZE,
1862 &hba->task_ctx_bd_dma, 1862 &hba->task_ctx_bd_dma,
1863 GFP_KERNEL); 1863 GFP_KERNEL);
1864 if (!hba->task_ctx_bd_tbl) { 1864 if (!hba->task_ctx_bd_tbl) {
1865 printk(KERN_ERR PFX "unable to allocate task context BDT\n"); 1865 printk(KERN_ERR PFX "unable to allocate task context BDT\n");
1866 rc = -1; 1866 rc = -1;
@@ -1894,10 +1894,10 @@ int bnx2fc_setup_task_ctx(struct bnx2fc_hba *hba)
1894 task_ctx_bdt = (struct regpair *)hba->task_ctx_bd_tbl; 1894 task_ctx_bdt = (struct regpair *)hba->task_ctx_bd_tbl;
1895 for (i = 0; i < task_ctx_arr_sz; i++) { 1895 for (i = 0; i < task_ctx_arr_sz; i++) {
1896 1896
1897 hba->task_ctx[i] = dma_zalloc_coherent(&hba->pcidev->dev, 1897 hba->task_ctx[i] = dma_alloc_coherent(&hba->pcidev->dev,
1898 PAGE_SIZE, 1898 PAGE_SIZE,
1899 &hba->task_ctx_dma[i], 1899 &hba->task_ctx_dma[i],
1900 GFP_KERNEL); 1900 GFP_KERNEL);
1901 if (!hba->task_ctx[i]) { 1901 if (!hba->task_ctx[i]) {
1902 printk(KERN_ERR PFX "unable to alloc task context\n"); 1902 printk(KERN_ERR PFX "unable to alloc task context\n");
1903 rc = -1; 1903 rc = -1;
@@ -2031,19 +2031,19 @@ static int bnx2fc_allocate_hash_table(struct bnx2fc_hba *hba)
2031 } 2031 }
2032 2032
2033 for (i = 0; i < segment_count; ++i) { 2033 for (i = 0; i < segment_count; ++i) {
2034 hba->hash_tbl_segments[i] = dma_zalloc_coherent(&hba->pcidev->dev, 2034 hba->hash_tbl_segments[i] = dma_alloc_coherent(&hba->pcidev->dev,
2035 BNX2FC_HASH_TBL_CHUNK_SIZE, 2035 BNX2FC_HASH_TBL_CHUNK_SIZE,
2036 &dma_segment_array[i], 2036 &dma_segment_array[i],
2037 GFP_KERNEL); 2037 GFP_KERNEL);
2038 if (!hba->hash_tbl_segments[i]) { 2038 if (!hba->hash_tbl_segments[i]) {
2039 printk(KERN_ERR PFX "hash segment alloc failed\n"); 2039 printk(KERN_ERR PFX "hash segment alloc failed\n");
2040 goto cleanup_dma; 2040 goto cleanup_dma;
2041 } 2041 }
2042 } 2042 }
2043 2043
2044 hba->hash_tbl_pbl = dma_zalloc_coherent(&hba->pcidev->dev, PAGE_SIZE, 2044 hba->hash_tbl_pbl = dma_alloc_coherent(&hba->pcidev->dev, PAGE_SIZE,
2045 &hba->hash_tbl_pbl_dma, 2045 &hba->hash_tbl_pbl_dma,
2046 GFP_KERNEL); 2046 GFP_KERNEL);
2047 if (!hba->hash_tbl_pbl) { 2047 if (!hba->hash_tbl_pbl) {
2048 printk(KERN_ERR PFX "hash table pbl alloc failed\n"); 2048 printk(KERN_ERR PFX "hash table pbl alloc failed\n");
2049 goto cleanup_dma; 2049 goto cleanup_dma;
@@ -2104,10 +2104,9 @@ int bnx2fc_setup_fw_resc(struct bnx2fc_hba *hba)
2104 return -ENOMEM; 2104 return -ENOMEM;
2105 2105
2106 mem_size = BNX2FC_NUM_MAX_SESS * sizeof(struct regpair); 2106 mem_size = BNX2FC_NUM_MAX_SESS * sizeof(struct regpair);
2107 hba->t2_hash_tbl_ptr = dma_zalloc_coherent(&hba->pcidev->dev, 2107 hba->t2_hash_tbl_ptr = dma_alloc_coherent(&hba->pcidev->dev, mem_size,
2108 mem_size, 2108 &hba->t2_hash_tbl_ptr_dma,
2109 &hba->t2_hash_tbl_ptr_dma, 2109 GFP_KERNEL);
2110 GFP_KERNEL);
2111 if (!hba->t2_hash_tbl_ptr) { 2110 if (!hba->t2_hash_tbl_ptr) {
2112 printk(KERN_ERR PFX "unable to allocate t2 hash table ptr\n"); 2111 printk(KERN_ERR PFX "unable to allocate t2 hash table ptr\n");
2113 bnx2fc_free_fw_resc(hba); 2112 bnx2fc_free_fw_resc(hba);
@@ -2116,9 +2115,9 @@ int bnx2fc_setup_fw_resc(struct bnx2fc_hba *hba)
2116 2115
2117 mem_size = BNX2FC_NUM_MAX_SESS * 2116 mem_size = BNX2FC_NUM_MAX_SESS *
2118 sizeof(struct fcoe_t2_hash_table_entry); 2117 sizeof(struct fcoe_t2_hash_table_entry);
2119 hba->t2_hash_tbl = dma_zalloc_coherent(&hba->pcidev->dev, mem_size, 2118 hba->t2_hash_tbl = dma_alloc_coherent(&hba->pcidev->dev, mem_size,
2120 &hba->t2_hash_tbl_dma, 2119 &hba->t2_hash_tbl_dma,
2121 GFP_KERNEL); 2120 GFP_KERNEL);
2122 if (!hba->t2_hash_tbl) { 2121 if (!hba->t2_hash_tbl) {
2123 printk(KERN_ERR PFX "unable to allocate t2 hash table\n"); 2122 printk(KERN_ERR PFX "unable to allocate t2 hash table\n");
2124 bnx2fc_free_fw_resc(hba); 2123 bnx2fc_free_fw_resc(hba);
@@ -2140,9 +2139,9 @@ int bnx2fc_setup_fw_resc(struct bnx2fc_hba *hba)
2140 return -ENOMEM; 2139 return -ENOMEM;
2141 } 2140 }
2142 2141
2143 hba->stats_buffer = dma_zalloc_coherent(&hba->pcidev->dev, PAGE_SIZE, 2142 hba->stats_buffer = dma_alloc_coherent(&hba->pcidev->dev, PAGE_SIZE,
2144 &hba->stats_buf_dma, 2143 &hba->stats_buf_dma,
2145 GFP_KERNEL); 2144 GFP_KERNEL);
2146 if (!hba->stats_buffer) { 2145 if (!hba->stats_buffer) {
2147 printk(KERN_ERR PFX "unable to alloc Stats Buffer\n"); 2146 printk(KERN_ERR PFX "unable to alloc Stats Buffer\n");
2148 bnx2fc_free_fw_resc(hba); 2147 bnx2fc_free_fw_resc(hba);
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
index e3d1c7c440c8..d735e87e416a 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
@@ -672,8 +672,8 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
672 tgt->sq_mem_size = (tgt->sq_mem_size + (CNIC_PAGE_SIZE - 1)) & 672 tgt->sq_mem_size = (tgt->sq_mem_size + (CNIC_PAGE_SIZE - 1)) &
673 CNIC_PAGE_MASK; 673 CNIC_PAGE_MASK;
674 674
675 tgt->sq = dma_zalloc_coherent(&hba->pcidev->dev, tgt->sq_mem_size, 675 tgt->sq = dma_alloc_coherent(&hba->pcidev->dev, tgt->sq_mem_size,
676 &tgt->sq_dma, GFP_KERNEL); 676 &tgt->sq_dma, GFP_KERNEL);
677 if (!tgt->sq) { 677 if (!tgt->sq) {
678 printk(KERN_ERR PFX "unable to allocate SQ memory %d\n", 678 printk(KERN_ERR PFX "unable to allocate SQ memory %d\n",
679 tgt->sq_mem_size); 679 tgt->sq_mem_size);
@@ -685,8 +685,8 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
685 tgt->cq_mem_size = (tgt->cq_mem_size + (CNIC_PAGE_SIZE - 1)) & 685 tgt->cq_mem_size = (tgt->cq_mem_size + (CNIC_PAGE_SIZE - 1)) &
686 CNIC_PAGE_MASK; 686 CNIC_PAGE_MASK;
687 687
688 tgt->cq = dma_zalloc_coherent(&hba->pcidev->dev, tgt->cq_mem_size, 688 tgt->cq = dma_alloc_coherent(&hba->pcidev->dev, tgt->cq_mem_size,
689 &tgt->cq_dma, GFP_KERNEL); 689 &tgt->cq_dma, GFP_KERNEL);
690 if (!tgt->cq) { 690 if (!tgt->cq) {
691 printk(KERN_ERR PFX "unable to allocate CQ memory %d\n", 691 printk(KERN_ERR PFX "unable to allocate CQ memory %d\n",
692 tgt->cq_mem_size); 692 tgt->cq_mem_size);
@@ -698,8 +698,8 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
698 tgt->rq_mem_size = (tgt->rq_mem_size + (CNIC_PAGE_SIZE - 1)) & 698 tgt->rq_mem_size = (tgt->rq_mem_size + (CNIC_PAGE_SIZE - 1)) &
699 CNIC_PAGE_MASK; 699 CNIC_PAGE_MASK;
700 700
701 tgt->rq = dma_zalloc_coherent(&hba->pcidev->dev, tgt->rq_mem_size, 701 tgt->rq = dma_alloc_coherent(&hba->pcidev->dev, tgt->rq_mem_size,
702 &tgt->rq_dma, GFP_KERNEL); 702 &tgt->rq_dma, GFP_KERNEL);
703 if (!tgt->rq) { 703 if (!tgt->rq) {
704 printk(KERN_ERR PFX "unable to allocate RQ memory %d\n", 704 printk(KERN_ERR PFX "unable to allocate RQ memory %d\n",
705 tgt->rq_mem_size); 705 tgt->rq_mem_size);
@@ -710,8 +710,8 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
710 tgt->rq_pbl_size = (tgt->rq_pbl_size + (CNIC_PAGE_SIZE - 1)) & 710 tgt->rq_pbl_size = (tgt->rq_pbl_size + (CNIC_PAGE_SIZE - 1)) &
711 CNIC_PAGE_MASK; 711 CNIC_PAGE_MASK;
712 712
713 tgt->rq_pbl = dma_zalloc_coherent(&hba->pcidev->dev, tgt->rq_pbl_size, 713 tgt->rq_pbl = dma_alloc_coherent(&hba->pcidev->dev, tgt->rq_pbl_size,
714 &tgt->rq_pbl_dma, GFP_KERNEL); 714 &tgt->rq_pbl_dma, GFP_KERNEL);
715 if (!tgt->rq_pbl) { 715 if (!tgt->rq_pbl) {
716 printk(KERN_ERR PFX "unable to allocate RQ PBL %d\n", 716 printk(KERN_ERR PFX "unable to allocate RQ PBL %d\n",
717 tgt->rq_pbl_size); 717 tgt->rq_pbl_size);
@@ -735,9 +735,9 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
735 tgt->xferq_mem_size = (tgt->xferq_mem_size + (CNIC_PAGE_SIZE - 1)) & 735 tgt->xferq_mem_size = (tgt->xferq_mem_size + (CNIC_PAGE_SIZE - 1)) &
736 CNIC_PAGE_MASK; 736 CNIC_PAGE_MASK;
737 737
738 tgt->xferq = dma_zalloc_coherent(&hba->pcidev->dev, 738 tgt->xferq = dma_alloc_coherent(&hba->pcidev->dev,
739 tgt->xferq_mem_size, &tgt->xferq_dma, 739 tgt->xferq_mem_size, &tgt->xferq_dma,
740 GFP_KERNEL); 740 GFP_KERNEL);
741 if (!tgt->xferq) { 741 if (!tgt->xferq) {
742 printk(KERN_ERR PFX "unable to allocate XFERQ %d\n", 742 printk(KERN_ERR PFX "unable to allocate XFERQ %d\n",
743 tgt->xferq_mem_size); 743 tgt->xferq_mem_size);
@@ -749,9 +749,9 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
749 tgt->confq_mem_size = (tgt->confq_mem_size + (CNIC_PAGE_SIZE - 1)) & 749 tgt->confq_mem_size = (tgt->confq_mem_size + (CNIC_PAGE_SIZE - 1)) &
750 CNIC_PAGE_MASK; 750 CNIC_PAGE_MASK;
751 751
752 tgt->confq = dma_zalloc_coherent(&hba->pcidev->dev, 752 tgt->confq = dma_alloc_coherent(&hba->pcidev->dev,
753 tgt->confq_mem_size, &tgt->confq_dma, 753 tgt->confq_mem_size, &tgt->confq_dma,
754 GFP_KERNEL); 754 GFP_KERNEL);
755 if (!tgt->confq) { 755 if (!tgt->confq) {
756 printk(KERN_ERR PFX "unable to allocate CONFQ %d\n", 756 printk(KERN_ERR PFX "unable to allocate CONFQ %d\n",
757 tgt->confq_mem_size); 757 tgt->confq_mem_size);
@@ -763,9 +763,9 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
763 tgt->confq_pbl_size = 763 tgt->confq_pbl_size =
764 (tgt->confq_pbl_size + (CNIC_PAGE_SIZE - 1)) & CNIC_PAGE_MASK; 764 (tgt->confq_pbl_size + (CNIC_PAGE_SIZE - 1)) & CNIC_PAGE_MASK;
765 765
766 tgt->confq_pbl = dma_zalloc_coherent(&hba->pcidev->dev, 766 tgt->confq_pbl = dma_alloc_coherent(&hba->pcidev->dev,
767 tgt->confq_pbl_size, 767 tgt->confq_pbl_size,
768 &tgt->confq_pbl_dma, GFP_KERNEL); 768 &tgt->confq_pbl_dma, GFP_KERNEL);
769 if (!tgt->confq_pbl) { 769 if (!tgt->confq_pbl) {
770 printk(KERN_ERR PFX "unable to allocate CONFQ PBL %d\n", 770 printk(KERN_ERR PFX "unable to allocate CONFQ PBL %d\n",
771 tgt->confq_pbl_size); 771 tgt->confq_pbl_size);
@@ -787,9 +787,9 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
787 /* Allocate and map ConnDB */ 787 /* Allocate and map ConnDB */
788 tgt->conn_db_mem_size = sizeof(struct fcoe_conn_db); 788 tgt->conn_db_mem_size = sizeof(struct fcoe_conn_db);
789 789
790 tgt->conn_db = dma_zalloc_coherent(&hba->pcidev->dev, 790 tgt->conn_db = dma_alloc_coherent(&hba->pcidev->dev,
791 tgt->conn_db_mem_size, 791 tgt->conn_db_mem_size,
792 &tgt->conn_db_dma, GFP_KERNEL); 792 &tgt->conn_db_dma, GFP_KERNEL);
793 if (!tgt->conn_db) { 793 if (!tgt->conn_db) {
794 printk(KERN_ERR PFX "unable to allocate conn_db %d\n", 794 printk(KERN_ERR PFX "unable to allocate conn_db %d\n",
795 tgt->conn_db_mem_size); 795 tgt->conn_db_mem_size);
@@ -802,8 +802,8 @@ static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba,
802 tgt->lcq_mem_size = (tgt->lcq_mem_size + (CNIC_PAGE_SIZE - 1)) & 802 tgt->lcq_mem_size = (tgt->lcq_mem_size + (CNIC_PAGE_SIZE - 1)) &
803 CNIC_PAGE_MASK; 803 CNIC_PAGE_MASK;
804 804
805 tgt->lcq = dma_zalloc_coherent(&hba->pcidev->dev, tgt->lcq_mem_size, 805 tgt->lcq = dma_alloc_coherent(&hba->pcidev->dev, tgt->lcq_mem_size,
806 &tgt->lcq_dma, GFP_KERNEL); 806 &tgt->lcq_dma, GFP_KERNEL);
807 807
808 if (!tgt->lcq) { 808 if (!tgt->lcq) {
809 printk(KERN_ERR PFX "unable to allocate lcq %d\n", 809 printk(KERN_ERR PFX "unable to allocate lcq %d\n",
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 91f5316aa3ab..fae6f71e677d 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -1070,8 +1070,8 @@ int bnx2i_alloc_qp_resc(struct bnx2i_hba *hba, struct bnx2i_endpoint *ep)
1070 1070
1071 /* Allocate memory area for actual SQ element */ 1071 /* Allocate memory area for actual SQ element */
1072 ep->qp.sq_virt = 1072 ep->qp.sq_virt =
1073 dma_zalloc_coherent(&hba->pcidev->dev, ep->qp.sq_mem_size, 1073 dma_alloc_coherent(&hba->pcidev->dev, ep->qp.sq_mem_size,
1074 &ep->qp.sq_phys, GFP_KERNEL); 1074 &ep->qp.sq_phys, GFP_KERNEL);
1075 if (!ep->qp.sq_virt) { 1075 if (!ep->qp.sq_virt) {
1076 printk(KERN_ALERT "bnx2i: unable to alloc SQ BD memory %d\n", 1076 printk(KERN_ALERT "bnx2i: unable to alloc SQ BD memory %d\n",
1077 ep->qp.sq_mem_size); 1077 ep->qp.sq_mem_size);
@@ -1106,8 +1106,8 @@ int bnx2i_alloc_qp_resc(struct bnx2i_hba *hba, struct bnx2i_endpoint *ep)
1106 1106
1107 /* Allocate memory area for actual CQ element */ 1107 /* Allocate memory area for actual CQ element */
1108 ep->qp.cq_virt = 1108 ep->qp.cq_virt =
1109 dma_zalloc_coherent(&hba->pcidev->dev, ep->qp.cq_mem_size, 1109 dma_alloc_coherent(&hba->pcidev->dev, ep->qp.cq_mem_size,
1110 &ep->qp.cq_phys, GFP_KERNEL); 1110 &ep->qp.cq_phys, GFP_KERNEL);
1111 if (!ep->qp.cq_virt) { 1111 if (!ep->qp.cq_virt) {
1112 printk(KERN_ALERT "bnx2i: unable to alloc CQ BD memory %d\n", 1112 printk(KERN_ALERT "bnx2i: unable to alloc CQ BD memory %d\n",
1113 ep->qp.cq_mem_size); 1113 ep->qp.cq_mem_size);
diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
index dc12933533d5..66bbd21819ae 100644
--- a/drivers/scsi/csiostor/csio_wr.c
+++ b/drivers/scsi/csiostor/csio_wr.c
@@ -233,8 +233,8 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize,
233 233
234 q = wrm->q_arr[free_idx]; 234 q = wrm->q_arr[free_idx];
235 235
236 q->vstart = dma_zalloc_coherent(&hw->pdev->dev, qsz, &q->pstart, 236 q->vstart = dma_alloc_coherent(&hw->pdev->dev, qsz, &q->pstart,
237 GFP_KERNEL); 237 GFP_KERNEL);
238 if (!q->vstart) { 238 if (!q->vstart) {
239 csio_err(hw, 239 csio_err(hw,
240 "Failed to allocate DMA memory for " 240 "Failed to allocate DMA memory for "
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 8698af86485d..2dc564e59430 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -2730,8 +2730,8 @@ lpfc_bsg_dma_page_alloc(struct lpfc_hba *phba)
2730 INIT_LIST_HEAD(&dmabuf->list); 2730 INIT_LIST_HEAD(&dmabuf->list);
2731 2731
2732 /* now, allocate dma buffer */ 2732 /* now, allocate dma buffer */
2733 dmabuf->virt = dma_zalloc_coherent(&pcidev->dev, BSG_MBOX_SIZE, 2733 dmabuf->virt = dma_alloc_coherent(&pcidev->dev, BSG_MBOX_SIZE,
2734 &(dmabuf->phys), GFP_KERNEL); 2734 &(dmabuf->phys), GFP_KERNEL);
2735 2735
2736 if (!dmabuf->virt) { 2736 if (!dmabuf->virt) {
2737 kfree(dmabuf); 2737 kfree(dmabuf);
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index c1c36812c3d2..bede11e16349 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -6973,9 +6973,9 @@ lpfc_sli4_create_rpi_hdr(struct lpfc_hba *phba)
6973 if (!dmabuf) 6973 if (!dmabuf)
6974 return NULL; 6974 return NULL;
6975 6975
6976 dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, 6976 dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev,
6977 LPFC_HDR_TEMPLATE_SIZE, 6977 LPFC_HDR_TEMPLATE_SIZE,
6978 &dmabuf->phys, GFP_KERNEL); 6978 &dmabuf->phys, GFP_KERNEL);
6979 if (!dmabuf->virt) { 6979 if (!dmabuf->virt) {
6980 rpi_hdr = NULL; 6980 rpi_hdr = NULL;
6981 goto err_free_dmabuf; 6981 goto err_free_dmabuf;
@@ -7397,8 +7397,8 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba *phba)
7397 } 7397 }
7398 7398
7399 /* Allocate memory for SLI-2 structures */ 7399 /* Allocate memory for SLI-2 structures */
7400 phba->slim2p.virt = dma_zalloc_coherent(&pdev->dev, SLI2_SLIM_SIZE, 7400 phba->slim2p.virt = dma_alloc_coherent(&pdev->dev, SLI2_SLIM_SIZE,
7401 &phba->slim2p.phys, GFP_KERNEL); 7401 &phba->slim2p.phys, GFP_KERNEL);
7402 if (!phba->slim2p.virt) 7402 if (!phba->slim2p.virt)
7403 goto out_iounmap; 7403 goto out_iounmap;
7404 7404
@@ -7816,8 +7816,8 @@ lpfc_create_bootstrap_mbox(struct lpfc_hba *phba)
7816 * plus an alignment restriction of 16 bytes. 7816 * plus an alignment restriction of 16 bytes.
7817 */ 7817 */
7818 bmbx_size = sizeof(struct lpfc_bmbx_create) + (LPFC_ALIGN_16_BYTE - 1); 7818 bmbx_size = sizeof(struct lpfc_bmbx_create) + (LPFC_ALIGN_16_BYTE - 1);
7819 dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, bmbx_size, 7819 dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, bmbx_size,
7820 &dmabuf->phys, GFP_KERNEL); 7820 &dmabuf->phys, GFP_KERNEL);
7821 if (!dmabuf->virt) { 7821 if (!dmabuf->virt) {
7822 kfree(dmabuf); 7822 kfree(dmabuf);
7823 return -ENOMEM; 7823 return -ENOMEM;
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index f6a5083a621e..4d3b94317515 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -1827,9 +1827,9 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox,
1827 * page, this is used as a priori size of SLI4_PAGE_SIZE for 1827 * page, this is used as a priori size of SLI4_PAGE_SIZE for
1828 * the later DMA memory free. 1828 * the later DMA memory free.
1829 */ 1829 */
1830 viraddr = dma_zalloc_coherent(&phba->pcidev->dev, 1830 viraddr = dma_alloc_coherent(&phba->pcidev->dev,
1831 SLI4_PAGE_SIZE, &phyaddr, 1831 SLI4_PAGE_SIZE, &phyaddr,
1832 GFP_KERNEL); 1832 GFP_KERNEL);
1833 /* In case of malloc fails, proceed with whatever we have */ 1833 /* In case of malloc fails, proceed with whatever we have */
1834 if (!viraddr) 1834 if (!viraddr)
1835 break; 1835 break;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 30734caf77e1..12fd74761ae0 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -5362,8 +5362,8 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,
5362 * mailbox command. 5362 * mailbox command.
5363 */ 5363 */
5364 dma_size = *vpd_size; 5364 dma_size = *vpd_size;
5365 dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, dma_size, 5365 dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev, dma_size,
5366 &dmabuf->phys, GFP_KERNEL); 5366 &dmabuf->phys, GFP_KERNEL);
5367 if (!dmabuf->virt) { 5367 if (!dmabuf->virt) {
5368 kfree(dmabuf); 5368 kfree(dmabuf);
5369 return -ENOMEM; 5369 return -ENOMEM;
@@ -6300,10 +6300,9 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba,
6300 goto free_mem; 6300 goto free_mem;
6301 } 6301 }
6302 6302
6303 dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, 6303 dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev,
6304 LPFC_RAS_MAX_ENTRY_SIZE, 6304 LPFC_RAS_MAX_ENTRY_SIZE,
6305 &dmabuf->phys, 6305 &dmabuf->phys, GFP_KERNEL);
6306 GFP_KERNEL);
6307 if (!dmabuf->virt) { 6306 if (!dmabuf->virt) {
6308 kfree(dmabuf); 6307 kfree(dmabuf);
6309 rc = -ENOMEM; 6308 rc = -ENOMEM;
@@ -14613,9 +14612,9 @@ lpfc_sli4_queue_alloc(struct lpfc_hba *phba, uint32_t page_size,
14613 dmabuf = kzalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); 14612 dmabuf = kzalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL);
14614 if (!dmabuf) 14613 if (!dmabuf)
14615 goto out_fail; 14614 goto out_fail;
14616 dmabuf->virt = dma_zalloc_coherent(&phba->pcidev->dev, 14615 dmabuf->virt = dma_alloc_coherent(&phba->pcidev->dev,
14617 hw_page_size, &dmabuf->phys, 14616 hw_page_size, &dmabuf->phys,
14618 GFP_KERNEL); 14617 GFP_KERNEL);
14619 if (!dmabuf->virt) { 14618 if (!dmabuf->virt) {
14620 kfree(dmabuf); 14619 kfree(dmabuf);
14621 goto out_fail; 14620 goto out_fail;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index e836392b75e8..f112458023ff 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -967,9 +967,10 @@ megaraid_alloc_cmd_packets(adapter_t *adapter)
967 * Allocate the common 16-byte aligned memory for the handshake 967 * Allocate the common 16-byte aligned memory for the handshake
968 * mailbox. 968 * mailbox.
969 */ 969 */
970 raid_dev->una_mbox64 = dma_zalloc_coherent(&adapter->pdev->dev, 970 raid_dev->una_mbox64 = dma_alloc_coherent(&adapter->pdev->dev,
971 sizeof(mbox64_t), &raid_dev->una_mbox64_dma, 971 sizeof(mbox64_t),
972 GFP_KERNEL); 972 &raid_dev->una_mbox64_dma,
973 GFP_KERNEL);
973 974
974 if (!raid_dev->una_mbox64) { 975 if (!raid_dev->una_mbox64) {
975 con_log(CL_ANN, (KERN_WARNING 976 con_log(CL_ANN, (KERN_WARNING
@@ -995,8 +996,8 @@ megaraid_alloc_cmd_packets(adapter_t *adapter)
995 align; 996 align;
996 997
997 // Allocate memory for commands issued internally 998 // Allocate memory for commands issued internally
998 adapter->ibuf = dma_zalloc_coherent(&pdev->dev, MBOX_IBUF_SIZE, 999 adapter->ibuf = dma_alloc_coherent(&pdev->dev, MBOX_IBUF_SIZE,
999 &adapter->ibuf_dma_h, GFP_KERNEL); 1000 &adapter->ibuf_dma_h, GFP_KERNEL);
1000 if (!adapter->ibuf) { 1001 if (!adapter->ibuf) {
1001 1002
1002 con_log(CL_ANN, (KERN_WARNING 1003 con_log(CL_ANN, (KERN_WARNING
@@ -2897,8 +2898,8 @@ megaraid_mbox_product_info(adapter_t *adapter)
2897 * Issue an ENQUIRY3 command to find out certain adapter parameters, 2898 * Issue an ENQUIRY3 command to find out certain adapter parameters,
2898 * e.g., max channels, max commands etc. 2899 * e.g., max channels, max commands etc.
2899 */ 2900 */
2900 pinfo = dma_zalloc_coherent(&adapter->pdev->dev, sizeof(mraid_pinfo_t), 2901 pinfo = dma_alloc_coherent(&adapter->pdev->dev, sizeof(mraid_pinfo_t),
2901 &pinfo_dma_h, GFP_KERNEL); 2902 &pinfo_dma_h, GFP_KERNEL);
2902 if (pinfo == NULL) { 2903 if (pinfo == NULL) {
2903 con_log(CL_ANN, (KERN_WARNING 2904 con_log(CL_ANN, (KERN_WARNING
2904 "megaraid: out of memory, %s %d\n", __func__, 2905 "megaraid: out of memory, %s %d\n", __func__,
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f7bdd783360a..7eaa400f6328 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -2273,9 +2273,9 @@ static int megasas_get_ld_vf_affiliation_111(struct megasas_instance *instance,
2273 sizeof(struct MR_LD_VF_AFFILIATION_111)); 2273 sizeof(struct MR_LD_VF_AFFILIATION_111));
2274 else { 2274 else {
2275 new_affiliation_111 = 2275 new_affiliation_111 =
2276 dma_zalloc_coherent(&instance->pdev->dev, 2276 dma_alloc_coherent(&instance->pdev->dev,
2277 sizeof(struct MR_LD_VF_AFFILIATION_111), 2277 sizeof(struct MR_LD_VF_AFFILIATION_111),
2278 &new_affiliation_111_h, GFP_KERNEL); 2278 &new_affiliation_111_h, GFP_KERNEL);
2279 if (!new_affiliation_111) { 2279 if (!new_affiliation_111) {
2280 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate " 2280 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate "
2281 "memory for new affiliation for scsi%d\n", 2281 "memory for new affiliation for scsi%d\n",
@@ -2380,10 +2380,9 @@ static int megasas_get_ld_vf_affiliation_12(struct megasas_instance *instance,
2380 sizeof(struct MR_LD_VF_AFFILIATION)); 2380 sizeof(struct MR_LD_VF_AFFILIATION));
2381 else { 2381 else {
2382 new_affiliation = 2382 new_affiliation =
2383 dma_zalloc_coherent(&instance->pdev->dev, 2383 dma_alloc_coherent(&instance->pdev->dev,
2384 (MAX_LOGICAL_DRIVES + 1) * 2384 (MAX_LOGICAL_DRIVES + 1) * sizeof(struct MR_LD_VF_AFFILIATION),
2385 sizeof(struct MR_LD_VF_AFFILIATION), 2385 &new_affiliation_h, GFP_KERNEL);
2386 &new_affiliation_h, GFP_KERNEL);
2387 if (!new_affiliation) { 2386 if (!new_affiliation) {
2388 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate " 2387 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate "
2389 "memory for new affiliation for scsi%d\n", 2388 "memory for new affiliation for scsi%d\n",
@@ -2546,9 +2545,10 @@ int megasas_sriov_start_heartbeat(struct megasas_instance *instance,
2546 2545
2547 if (initial) { 2546 if (initial) {
2548 instance->hb_host_mem = 2547 instance->hb_host_mem =
2549 dma_zalloc_coherent(&instance->pdev->dev, 2548 dma_alloc_coherent(&instance->pdev->dev,
2550 sizeof(struct MR_CTRL_HB_HOST_MEM), 2549 sizeof(struct MR_CTRL_HB_HOST_MEM),
2551 &instance->hb_host_mem_h, GFP_KERNEL); 2550 &instance->hb_host_mem_h,
2551 GFP_KERNEL);
2552 if (!instance->hb_host_mem) { 2552 if (!instance->hb_host_mem) {
2553 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate" 2553 dev_printk(KERN_DEBUG, &instance->pdev->dev, "SR-IOV: Couldn't allocate"
2554 " memory for heartbeat host memory for scsi%d\n", 2554 " memory for heartbeat host memory for scsi%d\n",
@@ -5816,9 +5816,9 @@ megasas_get_seq_num(struct megasas_instance *instance,
5816 } 5816 }
5817 5817
5818 dcmd = &cmd->frame->dcmd; 5818 dcmd = &cmd->frame->dcmd;
5819 el_info = dma_zalloc_coherent(&instance->pdev->dev, 5819 el_info = dma_alloc_coherent(&instance->pdev->dev,
5820 sizeof(struct megasas_evt_log_info), &el_info_h, 5820 sizeof(struct megasas_evt_log_info),
5821 GFP_KERNEL); 5821 &el_info_h, GFP_KERNEL);
5822 if (!el_info) { 5822 if (!el_info) {
5823 megasas_return_cmd(instance, cmd); 5823 megasas_return_cmd(instance, cmd);
5824 return -ENOMEM; 5824 return -ENOMEM;
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 211c17c33aa0..a9a25f0eaf6f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -689,8 +689,9 @@ megasas_alloc_rdpq_fusion(struct megasas_instance *instance)
689 array_size = sizeof(struct MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY) * 689 array_size = sizeof(struct MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY) *
690 MAX_MSIX_QUEUES_FUSION; 690 MAX_MSIX_QUEUES_FUSION;
691 691
692 fusion->rdpq_virt = dma_zalloc_coherent(&instance->pdev->dev, 692 fusion->rdpq_virt = dma_alloc_coherent(&instance->pdev->dev,
693 array_size, &fusion->rdpq_phys, GFP_KERNEL); 693 array_size, &fusion->rdpq_phys,
694 GFP_KERNEL);
694 if (!fusion->rdpq_virt) { 695 if (!fusion->rdpq_virt) {
695 dev_err(&instance->pdev->dev, 696 dev_err(&instance->pdev->dev,
696 "Failed from %s %d\n", __func__, __LINE__); 697 "Failed from %s %d\n", __func__, __LINE__);
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index f3e182eb0970..c9dc7740e9e7 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -1915,8 +1915,9 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
1915 /* We use the PCI APIs for now until the generic one gets fixed 1915 /* We use the PCI APIs for now until the generic one gets fixed
1916 * enough or until we get some macio-specific versions 1916 * enough or until we get some macio-specific versions
1917 */ 1917 */
1918 dma_cmd_space = dma_zalloc_coherent(&macio_get_pci_dev(mdev)->dev, 1918 dma_cmd_space = dma_alloc_coherent(&macio_get_pci_dev(mdev)->dev,
1919 ms->dma_cmd_size, &dma_cmd_bus, GFP_KERNEL); 1919 ms->dma_cmd_size, &dma_cmd_bus,
1920 GFP_KERNEL);
1920 if (dma_cmd_space == NULL) { 1921 if (dma_cmd_space == NULL) {
1921 printk(KERN_ERR "mesh: can't allocate DMA table\n"); 1922 printk(KERN_ERR "mesh: can't allocate DMA table\n");
1922 goto out_unmap; 1923 goto out_unmap;
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index dbe753fba486..36f64205ecfa 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -143,8 +143,9 @@ static struct mvumi_res *mvumi_alloc_mem_resource(struct mvumi_hba *mhba,
143 143
144 case RESOURCE_UNCACHED_MEMORY: 144 case RESOURCE_UNCACHED_MEMORY:
145 size = round_up(size, 8); 145 size = round_up(size, 8);
146 res->virt_addr = dma_zalloc_coherent(&mhba->pdev->dev, size, 146 res->virt_addr = dma_alloc_coherent(&mhba->pdev->dev, size,
147 &res->bus_addr, GFP_KERNEL); 147 &res->bus_addr,
148 GFP_KERNEL);
148 if (!res->virt_addr) { 149 if (!res->virt_addr) {
149 dev_err(&mhba->pdev->dev, 150 dev_err(&mhba->pdev->dev,
150 "unable to allocate consistent mem," 151 "unable to allocate consistent mem,"
@@ -246,8 +247,8 @@ static int mvumi_internal_cmd_sgl(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
246 if (size == 0) 247 if (size == 0)
247 return 0; 248 return 0;
248 249
249 virt_addr = dma_zalloc_coherent(&mhba->pdev->dev, size, &phy_addr, 250 virt_addr = dma_alloc_coherent(&mhba->pdev->dev, size, &phy_addr,
250 GFP_KERNEL); 251 GFP_KERNEL);
251 if (!virt_addr) 252 if (!virt_addr)
252 return -1; 253 return -1;
253 254
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index b3be49d41375..4c5a3d23e010 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -116,8 +116,8 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr,
116 u64 align_offset = 0; 116 u64 align_offset = 0;
117 if (align) 117 if (align)
118 align_offset = (dma_addr_t)align - 1; 118 align_offset = (dma_addr_t)align - 1;
119 mem_virt_alloc = dma_zalloc_coherent(&pdev->dev, mem_size + align, 119 mem_virt_alloc = dma_alloc_coherent(&pdev->dev, mem_size + align,
120 &mem_dma_handle, GFP_KERNEL); 120 &mem_dma_handle, GFP_KERNEL);
121 if (!mem_virt_alloc) { 121 if (!mem_virt_alloc) {
122 pm8001_printk("memory allocation error\n"); 122 pm8001_printk("memory allocation error\n");
123 return -1; 123 return -1;
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index edcaf4b0cb0b..9bbc19fc190b 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -1050,16 +1050,17 @@ static int qedf_alloc_sq(struct qedf_ctx *qedf, struct qedf_rport *fcport)
1050 sizeof(void *); 1050 sizeof(void *);
1051 fcport->sq_pbl_size = fcport->sq_pbl_size + QEDF_PAGE_SIZE; 1051 fcport->sq_pbl_size = fcport->sq_pbl_size + QEDF_PAGE_SIZE;
1052 1052
1053 fcport->sq = dma_zalloc_coherent(&qedf->pdev->dev, 1053 fcport->sq = dma_alloc_coherent(&qedf->pdev->dev, fcport->sq_mem_size,
1054 fcport->sq_mem_size, &fcport->sq_dma, GFP_KERNEL); 1054 &fcport->sq_dma, GFP_KERNEL);
1055 if (!fcport->sq) { 1055 if (!fcport->sq) {
1056 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate send queue.\n"); 1056 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate send queue.\n");
1057 rval = 1; 1057 rval = 1;
1058 goto out; 1058 goto out;
1059 } 1059 }
1060 1060
1061 fcport->sq_pbl = dma_zalloc_coherent(&qedf->pdev->dev, 1061 fcport->sq_pbl = dma_alloc_coherent(&qedf->pdev->dev,
1062 fcport->sq_pbl_size, &fcport->sq_pbl_dma, GFP_KERNEL); 1062 fcport->sq_pbl_size,
1063 &fcport->sq_pbl_dma, GFP_KERNEL);
1063 if (!fcport->sq_pbl) { 1064 if (!fcport->sq_pbl) {
1064 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate send queue PBL.\n"); 1065 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate send queue PBL.\n");
1065 rval = 1; 1066 rval = 1;
@@ -2680,8 +2681,10 @@ static int qedf_alloc_bdq(struct qedf_ctx *qedf)
2680 } 2681 }
2681 2682
2682 /* Allocate list of PBL pages */ 2683 /* Allocate list of PBL pages */
2683 qedf->bdq_pbl_list = dma_zalloc_coherent(&qedf->pdev->dev, 2684 qedf->bdq_pbl_list = dma_alloc_coherent(&qedf->pdev->dev,
2684 QEDF_PAGE_SIZE, &qedf->bdq_pbl_list_dma, GFP_KERNEL); 2685 QEDF_PAGE_SIZE,
2686 &qedf->bdq_pbl_list_dma,
2687 GFP_KERNEL);
2685 if (!qedf->bdq_pbl_list) { 2688 if (!qedf->bdq_pbl_list) {
2686 QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate list of PBL pages.\n"); 2689 QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate list of PBL pages.\n");
2687 return -ENOMEM; 2690 return -ENOMEM;
@@ -2770,9 +2773,10 @@ static int qedf_alloc_global_queues(struct qedf_ctx *qedf)
2770 ALIGN(qedf->global_queues[i]->cq_pbl_size, QEDF_PAGE_SIZE); 2773 ALIGN(qedf->global_queues[i]->cq_pbl_size, QEDF_PAGE_SIZE);
2771 2774
2772 qedf->global_queues[i]->cq = 2775 qedf->global_queues[i]->cq =
2773 dma_zalloc_coherent(&qedf->pdev->dev, 2776 dma_alloc_coherent(&qedf->pdev->dev,
2774 qedf->global_queues[i]->cq_mem_size, 2777 qedf->global_queues[i]->cq_mem_size,
2775 &qedf->global_queues[i]->cq_dma, GFP_KERNEL); 2778 &qedf->global_queues[i]->cq_dma,
2779 GFP_KERNEL);
2776 2780
2777 if (!qedf->global_queues[i]->cq) { 2781 if (!qedf->global_queues[i]->cq) {
2778 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate cq.\n"); 2782 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate cq.\n");
@@ -2781,9 +2785,10 @@ static int qedf_alloc_global_queues(struct qedf_ctx *qedf)
2781 } 2785 }
2782 2786
2783 qedf->global_queues[i]->cq_pbl = 2787 qedf->global_queues[i]->cq_pbl =
2784 dma_zalloc_coherent(&qedf->pdev->dev, 2788 dma_alloc_coherent(&qedf->pdev->dev,
2785 qedf->global_queues[i]->cq_pbl_size, 2789 qedf->global_queues[i]->cq_pbl_size,
2786 &qedf->global_queues[i]->cq_pbl_dma, GFP_KERNEL); 2790 &qedf->global_queues[i]->cq_pbl_dma,
2791 GFP_KERNEL);
2787 2792
2788 if (!qedf->global_queues[i]->cq_pbl) { 2793 if (!qedf->global_queues[i]->cq_pbl) {
2789 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate cq PBL.\n"); 2794 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate cq PBL.\n");
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index 5c53409a8cea..e74a62448ba4 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -1394,10 +1394,9 @@ static int qedi_alloc_nvm_iscsi_cfg(struct qedi_ctx *qedi)
1394{ 1394{
1395 struct qedi_nvm_iscsi_image nvm_image; 1395 struct qedi_nvm_iscsi_image nvm_image;
1396 1396
1397 qedi->iscsi_image = dma_zalloc_coherent(&qedi->pdev->dev, 1397 qedi->iscsi_image = dma_alloc_coherent(&qedi->pdev->dev,
1398 sizeof(nvm_image), 1398 sizeof(nvm_image),
1399 &qedi->nvm_buf_dma, 1399 &qedi->nvm_buf_dma, GFP_KERNEL);
1400 GFP_KERNEL);
1401 if (!qedi->iscsi_image) { 1400 if (!qedi->iscsi_image) {
1402 QEDI_ERR(&qedi->dbg_ctx, "Could not allocate NVM BUF.\n"); 1401 QEDI_ERR(&qedi->dbg_ctx, "Could not allocate NVM BUF.\n");
1403 return -ENOMEM; 1402 return -ENOMEM;
@@ -1510,10 +1509,10 @@ static int qedi_alloc_bdq(struct qedi_ctx *qedi)
1510 } 1509 }
1511 1510
1512 /* Allocate list of PBL pages */ 1511 /* Allocate list of PBL pages */
1513 qedi->bdq_pbl_list = dma_zalloc_coherent(&qedi->pdev->dev, 1512 qedi->bdq_pbl_list = dma_alloc_coherent(&qedi->pdev->dev,
1514 QEDI_PAGE_SIZE, 1513 QEDI_PAGE_SIZE,
1515 &qedi->bdq_pbl_list_dma, 1514 &qedi->bdq_pbl_list_dma,
1516 GFP_KERNEL); 1515 GFP_KERNEL);
1517 if (!qedi->bdq_pbl_list) { 1516 if (!qedi->bdq_pbl_list) {
1518 QEDI_ERR(&qedi->dbg_ctx, 1517 QEDI_ERR(&qedi->dbg_ctx,
1519 "Could not allocate list of PBL pages.\n"); 1518 "Could not allocate list of PBL pages.\n");
@@ -1609,10 +1608,10 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
1609 (qedi->global_queues[i]->cq_pbl_size + 1608 (qedi->global_queues[i]->cq_pbl_size +
1610 (QEDI_PAGE_SIZE - 1)); 1609 (QEDI_PAGE_SIZE - 1));
1611 1610
1612 qedi->global_queues[i]->cq = dma_zalloc_coherent(&qedi->pdev->dev, 1611 qedi->global_queues[i]->cq = dma_alloc_coherent(&qedi->pdev->dev,
1613 qedi->global_queues[i]->cq_mem_size, 1612 qedi->global_queues[i]->cq_mem_size,
1614 &qedi->global_queues[i]->cq_dma, 1613 &qedi->global_queues[i]->cq_dma,
1615 GFP_KERNEL); 1614 GFP_KERNEL);
1616 1615
1617 if (!qedi->global_queues[i]->cq) { 1616 if (!qedi->global_queues[i]->cq) {
1618 QEDI_WARN(&qedi->dbg_ctx, 1617 QEDI_WARN(&qedi->dbg_ctx,
@@ -1620,10 +1619,10 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
1620 status = -ENOMEM; 1619 status = -ENOMEM;
1621 goto mem_alloc_failure; 1620 goto mem_alloc_failure;
1622 } 1621 }
1623 qedi->global_queues[i]->cq_pbl = dma_zalloc_coherent(&qedi->pdev->dev, 1622 qedi->global_queues[i]->cq_pbl = dma_alloc_coherent(&qedi->pdev->dev,
1624 qedi->global_queues[i]->cq_pbl_size, 1623 qedi->global_queues[i]->cq_pbl_size,
1625 &qedi->global_queues[i]->cq_pbl_dma, 1624 &qedi->global_queues[i]->cq_pbl_dma,
1626 GFP_KERNEL); 1625 GFP_KERNEL);
1627 1626
1628 if (!qedi->global_queues[i]->cq_pbl) { 1627 if (!qedi->global_queues[i]->cq_pbl) {
1629 QEDI_WARN(&qedi->dbg_ctx, 1628 QEDI_WARN(&qedi->dbg_ctx,
@@ -1691,16 +1690,16 @@ int qedi_alloc_sq(struct qedi_ctx *qedi, struct qedi_endpoint *ep)
1691 ep->sq_pbl_size = (ep->sq_mem_size / QEDI_PAGE_SIZE) * sizeof(void *); 1690 ep->sq_pbl_size = (ep->sq_mem_size / QEDI_PAGE_SIZE) * sizeof(void *);
1692 ep->sq_pbl_size = ep->sq_pbl_size + QEDI_PAGE_SIZE; 1691 ep->sq_pbl_size = ep->sq_pbl_size + QEDI_PAGE_SIZE;
1693 1692
1694 ep->sq = dma_zalloc_coherent(&qedi->pdev->dev, ep->sq_mem_size, 1693 ep->sq = dma_alloc_coherent(&qedi->pdev->dev, ep->sq_mem_size,
1695 &ep->sq_dma, GFP_KERNEL); 1694 &ep->sq_dma, GFP_KERNEL);
1696 if (!ep->sq) { 1695 if (!ep->sq) {
1697 QEDI_WARN(&qedi->dbg_ctx, 1696 QEDI_WARN(&qedi->dbg_ctx,
1698 "Could not allocate send queue.\n"); 1697 "Could not allocate send queue.\n");
1699 rval = -ENOMEM; 1698 rval = -ENOMEM;
1700 goto out; 1699 goto out;
1701 } 1700 }
1702 ep->sq_pbl = dma_zalloc_coherent(&qedi->pdev->dev, ep->sq_pbl_size, 1701 ep->sq_pbl = dma_alloc_coherent(&qedi->pdev->dev, ep->sq_pbl_size,
1703 &ep->sq_pbl_dma, GFP_KERNEL); 1702 &ep->sq_pbl_dma, GFP_KERNEL);
1704 if (!ep->sq_pbl) { 1703 if (!ep->sq_pbl) {
1705 QEDI_WARN(&qedi->dbg_ctx, 1704 QEDI_WARN(&qedi->dbg_ctx,
1706 "Could not allocate send queue PBL.\n"); 1705 "Could not allocate send queue PBL.\n");
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 00444dc79756..ac504a1ff0ff 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -2415,8 +2415,8 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
2415 if (qla2x00_chip_is_down(vha)) 2415 if (qla2x00_chip_is_down(vha))
2416 goto done; 2416 goto done;
2417 2417
2418 stats = dma_zalloc_coherent(&ha->pdev->dev, sizeof(*stats), 2418 stats = dma_alloc_coherent(&ha->pdev->dev, sizeof(*stats), &stats_dma,
2419 &stats_dma, GFP_KERNEL); 2419 GFP_KERNEL);
2420 if (!stats) { 2420 if (!stats) {
2421 ql_log(ql_log_warn, vha, 0x707d, 2421 ql_log(ql_log_warn, vha, 0x707d,
2422 "Failed to allocate memory for stats.\n"); 2422 "Failed to allocate memory for stats.\n");
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 4a9fd8d944d6..17d42658ad9a 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -2312,8 +2312,8 @@ qla2x00_get_priv_stats(struct bsg_job *bsg_job)
2312 if (!IS_FWI2_CAPABLE(ha)) 2312 if (!IS_FWI2_CAPABLE(ha))
2313 return -EPERM; 2313 return -EPERM;
2314 2314
2315 stats = dma_zalloc_coherent(&ha->pdev->dev, sizeof(*stats), 2315 stats = dma_alloc_coherent(&ha->pdev->dev, sizeof(*stats), &stats_dma,
2316 &stats_dma, GFP_KERNEL); 2316 GFP_KERNEL);
2317 if (!stats) { 2317 if (!stats) {
2318 ql_log(ql_log_warn, vha, 0x70e2, 2318 ql_log(ql_log_warn, vha, 0x70e2,
2319 "Failed to allocate memory for stats.\n"); 2319 "Failed to allocate memory for stats.\n");
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 90cfa394f942..cbc3bc49d4d1 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -4147,9 +4147,10 @@ int qla24xx_async_gpnft(scsi_qla_host_t *vha, u8 fc4_type, srb_t *sp)
4147 return rval; 4147 return rval;
4148 } 4148 }
4149 4149
4150 sp->u.iocb_cmd.u.ctarg.req = dma_zalloc_coherent( 4150 sp->u.iocb_cmd.u.ctarg.req = dma_alloc_coherent(&vha->hw->pdev->dev,
4151 &vha->hw->pdev->dev, sizeof(struct ct_sns_pkt), 4151 sizeof(struct ct_sns_pkt),
4152 &sp->u.iocb_cmd.u.ctarg.req_dma, GFP_KERNEL); 4152 &sp->u.iocb_cmd.u.ctarg.req_dma,
4153 GFP_KERNEL);
4153 sp->u.iocb_cmd.u.ctarg.req_allocated_size = sizeof(struct ct_sns_pkt); 4154 sp->u.iocb_cmd.u.ctarg.req_allocated_size = sizeof(struct ct_sns_pkt);
4154 if (!sp->u.iocb_cmd.u.ctarg.req) { 4155 if (!sp->u.iocb_cmd.u.ctarg.req) {
4155 ql_log(ql_log_warn, vha, 0xffff, 4156 ql_log(ql_log_warn, vha, 0xffff,
@@ -4165,9 +4166,10 @@ int qla24xx_async_gpnft(scsi_qla_host_t *vha, u8 fc4_type, srb_t *sp)
4165 ((vha->hw->max_fibre_devices - 1) * 4166 ((vha->hw->max_fibre_devices - 1) *
4166 sizeof(struct ct_sns_gpn_ft_data)); 4167 sizeof(struct ct_sns_gpn_ft_data));
4167 4168
4168 sp->u.iocb_cmd.u.ctarg.rsp = dma_zalloc_coherent( 4169 sp->u.iocb_cmd.u.ctarg.rsp = dma_alloc_coherent(&vha->hw->pdev->dev,
4169 &vha->hw->pdev->dev, rspsz, 4170 rspsz,
4170 &sp->u.iocb_cmd.u.ctarg.rsp_dma, GFP_KERNEL); 4171 &sp->u.iocb_cmd.u.ctarg.rsp_dma,
4172 GFP_KERNEL);
4171 sp->u.iocb_cmd.u.ctarg.rsp_allocated_size = sizeof(struct ct_sns_pkt); 4173 sp->u.iocb_cmd.u.ctarg.rsp_allocated_size = sizeof(struct ct_sns_pkt);
4172 if (!sp->u.iocb_cmd.u.ctarg.rsp) { 4174 if (!sp->u.iocb_cmd.u.ctarg.rsp) {
4173 ql_log(ql_log_warn, vha, 0xffff, 4175 ql_log(ql_log_warn, vha, 0xffff,
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 364bb52ed2a6..aeeb0144bd55 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3099,8 +3099,8 @@ qla2x00_alloc_offload_mem(scsi_qla_host_t *vha)
3099 FCE_SIZE, ha->fce, ha->fce_dma); 3099 FCE_SIZE, ha->fce, ha->fce_dma);
3100 3100
3101 /* Allocate memory for Fibre Channel Event Buffer. */ 3101 /* Allocate memory for Fibre Channel Event Buffer. */
3102 tc = dma_zalloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, 3102 tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma,
3103 GFP_KERNEL); 3103 GFP_KERNEL);
3104 if (!tc) { 3104 if (!tc) {
3105 ql_log(ql_log_warn, vha, 0x00be, 3105 ql_log(ql_log_warn, vha, 0x00be,
3106 "Unable to allocate (%d KB) for FCE.\n", 3106 "Unable to allocate (%d KB) for FCE.\n",
@@ -3131,8 +3131,8 @@ try_eft:
3131 EFT_SIZE, ha->eft, ha->eft_dma); 3131 EFT_SIZE, ha->eft, ha->eft_dma);
3132 3132
3133 /* Allocate memory for Extended Trace Buffer. */ 3133 /* Allocate memory for Extended Trace Buffer. */
3134 tc = dma_zalloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma, 3134 tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma,
3135 GFP_KERNEL); 3135 GFP_KERNEL);
3136 if (!tc) { 3136 if (!tc) {
3137 ql_log(ql_log_warn, vha, 0x00c1, 3137 ql_log(ql_log_warn, vha, 0x00c1,
3138 "Unable to allocate (%d KB) for EFT.\n", 3138 "Unable to allocate (%d KB) for EFT.\n",
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 1ef74aa2d00a..2bf5e3e639e1 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -153,8 +153,8 @@ int qla4xxx_get_sys_info(struct scsi_qla_host *ha)
153 dma_addr_t sys_info_dma; 153 dma_addr_t sys_info_dma;
154 int status = QLA_ERROR; 154 int status = QLA_ERROR;
155 155
156 sys_info = dma_zalloc_coherent(&ha->pdev->dev, sizeof(*sys_info), 156 sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info),
157 &sys_info_dma, GFP_KERNEL); 157 &sys_info_dma, GFP_KERNEL);
158 if (sys_info == NULL) { 158 if (sys_info == NULL) {
159 DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n", 159 DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
160 ha->host_no, __func__)); 160 ha->host_no, __func__));
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 5d56904687b9..dac9a7013208 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -625,9 +625,9 @@ int qla4xxx_initialize_fw_cb(struct scsi_qla_host * ha)
625 uint32_t mbox_sts[MBOX_REG_COUNT]; 625 uint32_t mbox_sts[MBOX_REG_COUNT];
626 int status = QLA_ERROR; 626 int status = QLA_ERROR;
627 627
628 init_fw_cb = dma_zalloc_coherent(&ha->pdev->dev, 628 init_fw_cb = dma_alloc_coherent(&ha->pdev->dev,
629 sizeof(struct addr_ctrl_blk), 629 sizeof(struct addr_ctrl_blk),
630 &init_fw_cb_dma, GFP_KERNEL); 630 &init_fw_cb_dma, GFP_KERNEL);
631 if (init_fw_cb == NULL) { 631 if (init_fw_cb == NULL) {
632 DEBUG2(printk("scsi%ld: %s: Unable to alloc init_cb\n", 632 DEBUG2(printk("scsi%ld: %s: Unable to alloc init_cb\n",
633 ha->host_no, __func__)); 633 ha->host_no, __func__));
@@ -709,9 +709,9 @@ int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha)
709 uint32_t mbox_cmd[MBOX_REG_COUNT]; 709 uint32_t mbox_cmd[MBOX_REG_COUNT];
710 uint32_t mbox_sts[MBOX_REG_COUNT]; 710 uint32_t mbox_sts[MBOX_REG_COUNT];
711 711
712 init_fw_cb = dma_zalloc_coherent(&ha->pdev->dev, 712 init_fw_cb = dma_alloc_coherent(&ha->pdev->dev,
713 sizeof(struct addr_ctrl_blk), 713 sizeof(struct addr_ctrl_blk),
714 &init_fw_cb_dma, GFP_KERNEL); 714 &init_fw_cb_dma, GFP_KERNEL);
715 if (init_fw_cb == NULL) { 715 if (init_fw_cb == NULL) {
716 printk("scsi%ld: %s: Unable to alloc init_cb\n", ha->host_no, 716 printk("scsi%ld: %s: Unable to alloc init_cb\n", ha->host_no,
717 __func__); 717 __func__);
@@ -1340,9 +1340,9 @@ int qla4xxx_about_firmware(struct scsi_qla_host *ha)
1340 uint32_t mbox_sts[MBOX_REG_COUNT]; 1340 uint32_t mbox_sts[MBOX_REG_COUNT];
1341 int status = QLA_ERROR; 1341 int status = QLA_ERROR;
1342 1342
1343 about_fw = dma_zalloc_coherent(&ha->pdev->dev, 1343 about_fw = dma_alloc_coherent(&ha->pdev->dev,
1344 sizeof(struct about_fw_info), 1344 sizeof(struct about_fw_info),
1345 &about_fw_dma, GFP_KERNEL); 1345 &about_fw_dma, GFP_KERNEL);
1346 if (!about_fw) { 1346 if (!about_fw) {
1347 DEBUG2(ql4_printk(KERN_ERR, ha, "%s: Unable to alloc memory " 1347 DEBUG2(ql4_printk(KERN_ERR, ha, "%s: Unable to alloc memory "
1348 "for about_fw\n", __func__)); 1348 "for about_fw\n", __func__));
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index d2b333d629be..5a31877c9d04 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -4052,8 +4052,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
4052 dma_addr_t sys_info_dma; 4052 dma_addr_t sys_info_dma;
4053 int status = QLA_ERROR; 4053 int status = QLA_ERROR;
4054 4054
4055 sys_info = dma_zalloc_coherent(&ha->pdev->dev, sizeof(*sys_info), 4055 sys_info = dma_alloc_coherent(&ha->pdev->dev, sizeof(*sys_info),
4056 &sys_info_dma, GFP_KERNEL); 4056 &sys_info_dma, GFP_KERNEL);
4057 if (sys_info == NULL) { 4057 if (sys_info == NULL) {
4058 DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n", 4058 DEBUG2(printk("scsi%ld: %s: Unable to allocate dma buffer.\n",
4059 ha->host_no, __func__)); 4059 ha->host_no, __func__));
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 949e186cc5d7..cfdfcda28072 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2704,9 +2704,9 @@ qla4xxx_iface_set_param(struct Scsi_Host *shost, void *data, uint32_t len)
2704 uint32_t rem = len; 2704 uint32_t rem = len;
2705 struct nlattr *attr; 2705 struct nlattr *attr;
2706 2706
2707 init_fw_cb = dma_zalloc_coherent(&ha->pdev->dev, 2707 init_fw_cb = dma_alloc_coherent(&ha->pdev->dev,
2708 sizeof(struct addr_ctrl_blk), 2708 sizeof(struct addr_ctrl_blk),
2709 &init_fw_cb_dma, GFP_KERNEL); 2709 &init_fw_cb_dma, GFP_KERNEL);
2710 if (!init_fw_cb) { 2710 if (!init_fw_cb) {
2711 ql4_printk(KERN_ERR, ha, "%s: Unable to alloc init_cb\n", 2711 ql4_printk(KERN_ERR, ha, "%s: Unable to alloc init_cb\n",
2712 __func__); 2712 __func__);
@@ -4206,8 +4206,8 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
4206 sizeof(struct shadow_regs) + 4206 sizeof(struct shadow_regs) +
4207 MEM_ALIGN_VALUE + 4207 MEM_ALIGN_VALUE +
4208 (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); 4208 (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
4209 ha->queues = dma_zalloc_coherent(&ha->pdev->dev, ha->queues_len, 4209 ha->queues = dma_alloc_coherent(&ha->pdev->dev, ha->queues_len,
4210 &ha->queues_dma, GFP_KERNEL); 4210 &ha->queues_dma, GFP_KERNEL);
4211 if (ha->queues == NULL) { 4211 if (ha->queues == NULL) {
4212 ql4_printk(KERN_WARNING, ha, 4212 ql4_printk(KERN_WARNING, ha,
4213 "Memory Allocation failed - queues.\n"); 4213 "Memory Allocation failed - queues.\n");
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index e2fa3f476227..7bde6c809442 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -3576,9 +3576,9 @@ static int pqi_alloc_operational_queues(struct pqi_ctrl_info *ctrl_info)
3576 alloc_length += PQI_EXTRA_SGL_MEMORY; 3576 alloc_length += PQI_EXTRA_SGL_MEMORY;
3577 3577
3578 ctrl_info->queue_memory_base = 3578 ctrl_info->queue_memory_base =
3579 dma_zalloc_coherent(&ctrl_info->pci_dev->dev, 3579 dma_alloc_coherent(&ctrl_info->pci_dev->dev, alloc_length,
3580 alloc_length, 3580 &ctrl_info->queue_memory_base_dma_handle,
3581 &ctrl_info->queue_memory_base_dma_handle, GFP_KERNEL); 3581 GFP_KERNEL);
3582 3582
3583 if (!ctrl_info->queue_memory_base) 3583 if (!ctrl_info->queue_memory_base)
3584 return -ENOMEM; 3584 return -ENOMEM;
@@ -3715,10 +3715,9 @@ static int pqi_alloc_admin_queues(struct pqi_ctrl_info *ctrl_info)
3715 PQI_QUEUE_ELEMENT_ARRAY_ALIGNMENT; 3715 PQI_QUEUE_ELEMENT_ARRAY_ALIGNMENT;
3716 3716
3717 ctrl_info->admin_queue_memory_base = 3717 ctrl_info->admin_queue_memory_base =
3718 dma_zalloc_coherent(&ctrl_info->pci_dev->dev, 3718 dma_alloc_coherent(&ctrl_info->pci_dev->dev, alloc_length,
3719 alloc_length, 3719 &ctrl_info->admin_queue_memory_base_dma_handle,
3720 &ctrl_info->admin_queue_memory_base_dma_handle, 3720 GFP_KERNEL);
3721 GFP_KERNEL);
3722 3721
3723 if (!ctrl_info->admin_queue_memory_base) 3722 if (!ctrl_info->admin_queue_memory_base)
3724 return -ENOMEM; 3723 return -ENOMEM;
@@ -4602,9 +4601,10 @@ static void pqi_free_all_io_requests(struct pqi_ctrl_info *ctrl_info)
4602 4601
4603static inline int pqi_alloc_error_buffer(struct pqi_ctrl_info *ctrl_info) 4602static inline int pqi_alloc_error_buffer(struct pqi_ctrl_info *ctrl_info)
4604{ 4603{
4605 ctrl_info->error_buffer = dma_zalloc_coherent(&ctrl_info->pci_dev->dev, 4604 ctrl_info->error_buffer = dma_alloc_coherent(&ctrl_info->pci_dev->dev,
4606 ctrl_info->error_buffer_length, 4605 ctrl_info->error_buffer_length,
4607 &ctrl_info->error_buffer_dma_handle, GFP_KERNEL); 4606 &ctrl_info->error_buffer_dma_handle,
4607 GFP_KERNEL);
4608 4608
4609 if (!ctrl_info->error_buffer) 4609 if (!ctrl_info->error_buffer)
4610 return -ENOMEM; 4610 return -ENOMEM;
@@ -7487,8 +7487,8 @@ static int pqi_ofa_alloc_mem(struct pqi_ctrl_info *ctrl_info,
7487 dma_addr_t dma_handle; 7487 dma_addr_t dma_handle;
7488 7488
7489 ctrl_info->pqi_ofa_chunk_virt_addr[i] = 7489 ctrl_info->pqi_ofa_chunk_virt_addr[i] =
7490 dma_zalloc_coherent(dev, chunk_size, &dma_handle, 7490 dma_alloc_coherent(dev, chunk_size, &dma_handle,
7491 GFP_KERNEL); 7491 GFP_KERNEL);
7492 7492
7493 if (!ctrl_info->pqi_ofa_chunk_virt_addr[i]) 7493 if (!ctrl_info->pqi_ofa_chunk_virt_addr[i])
7494 break; 7494 break;
@@ -7545,10 +7545,10 @@ static void pqi_ofa_setup_host_buffer(struct pqi_ctrl_info *ctrl_info,
7545 struct device *dev; 7545 struct device *dev;
7546 7546
7547 dev = &ctrl_info->pci_dev->dev; 7547 dev = &ctrl_info->pci_dev->dev;
7548 pqi_ofa_memory = dma_zalloc_coherent(dev, 7548 pqi_ofa_memory = dma_alloc_coherent(dev,
7549 PQI_OFA_MEMORY_DESCRIPTOR_LENGTH, 7549 PQI_OFA_MEMORY_DESCRIPTOR_LENGTH,
7550 &ctrl_info->pqi_ofa_mem_dma_handle, 7550 &ctrl_info->pqi_ofa_mem_dma_handle,
7551 GFP_KERNEL); 7551 GFP_KERNEL);
7552 7552
7553 if (!pqi_ofa_memory) 7553 if (!pqi_ofa_memory)
7554 return; 7554 return;