aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_main.c')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 6f9ffb9026cd..e43cc8a73ea7 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4605,8 +4605,8 @@ static int lancer_fw_download(struct be_adapter *adapter,
4605 4605
4606 flash_cmd.size = sizeof(struct lancer_cmd_req_write_object) 4606 flash_cmd.size = sizeof(struct lancer_cmd_req_write_object)
4607 + LANCER_FW_DOWNLOAD_CHUNK; 4607 + LANCER_FW_DOWNLOAD_CHUNK;
4608 flash_cmd.va = dma_alloc_coherent(dev, flash_cmd.size, 4608 flash_cmd.va = dma_zalloc_coherent(dev, flash_cmd.size,
4609 &flash_cmd.dma, GFP_KERNEL); 4609 &flash_cmd.dma, GFP_KERNEL);
4610 if (!flash_cmd.va) 4610 if (!flash_cmd.va)
4611 return -ENOMEM; 4611 return -ENOMEM;
4612 4612
@@ -4739,8 +4739,8 @@ static int be_fw_download(struct be_adapter *adapter, const struct firmware* fw)
4739 } 4739 }
4740 4740
4741 flash_cmd.size = sizeof(struct be_cmd_write_flashrom); 4741 flash_cmd.size = sizeof(struct be_cmd_write_flashrom);
4742 flash_cmd.va = dma_alloc_coherent(dev, flash_cmd.size, &flash_cmd.dma, 4742 flash_cmd.va = dma_zalloc_coherent(dev, flash_cmd.size, &flash_cmd.dma,
4743 GFP_KERNEL); 4743 GFP_KERNEL);
4744 if (!flash_cmd.va) 4744 if (!flash_cmd.va)
4745 return -ENOMEM; 4745 return -ENOMEM;
4746 4746
@@ -5291,16 +5291,15 @@ static int be_drv_init(struct be_adapter *adapter)
5291 int status = 0; 5291 int status = 0;
5292 5292
5293 mbox_mem_alloc->size = sizeof(struct be_mcc_mailbox) + 16; 5293 mbox_mem_alloc->size = sizeof(struct be_mcc_mailbox) + 16;
5294 mbox_mem_alloc->va = dma_alloc_coherent(dev, mbox_mem_alloc->size, 5294 mbox_mem_alloc->va = dma_zalloc_coherent(dev, mbox_mem_alloc->size,
5295 &mbox_mem_alloc->dma, 5295 &mbox_mem_alloc->dma,
5296 GFP_KERNEL); 5296 GFP_KERNEL);
5297 if (!mbox_mem_alloc->va) 5297 if (!mbox_mem_alloc->va)
5298 return -ENOMEM; 5298 return -ENOMEM;
5299 5299
5300 mbox_mem_align->size = sizeof(struct be_mcc_mailbox); 5300 mbox_mem_align->size = sizeof(struct be_mcc_mailbox);
5301 mbox_mem_align->va = PTR_ALIGN(mbox_mem_alloc->va, 16); 5301 mbox_mem_align->va = PTR_ALIGN(mbox_mem_alloc->va, 16);
5302 mbox_mem_align->dma = PTR_ALIGN(mbox_mem_alloc->dma, 16); 5302 mbox_mem_align->dma = PTR_ALIGN(mbox_mem_alloc->dma, 16);
5303 memset(mbox_mem_align->va, 0, sizeof(struct be_mcc_mailbox));
5304 5303
5305 rx_filter->size = sizeof(struct be_cmd_req_rx_filter); 5304 rx_filter->size = sizeof(struct be_cmd_req_rx_filter);
5306 rx_filter->va = dma_zalloc_coherent(dev, rx_filter->size, 5305 rx_filter->va = dma_zalloc_coherent(dev, rx_filter->size,