.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * QLogic qlcnic NIC Driver |
---|
3 | 4 | * Copyright (c) 2009-2013 QLogic Corporation |
---|
4 | | - * |
---|
5 | | - * See LICENSE.qlcnic for copyright and licensing details. |
---|
6 | 5 | */ |
---|
7 | 6 | |
---|
8 | 7 | #include "qlcnic.h" |
---|
.. | .. |
---|
434 | 433 | *(tx_ring->hw_consumer) = 0; |
---|
435 | 434 | |
---|
436 | 435 | rq_size = SIZEOF_HOSTRQ_TX(struct qlcnic_hostrq_tx_ctx); |
---|
437 | | - rq_addr = dma_zalloc_coherent(&adapter->pdev->dev, rq_size, |
---|
438 | | - &rq_phys_addr, GFP_KERNEL); |
---|
| 436 | + rq_addr = dma_alloc_coherent(&adapter->pdev->dev, rq_size, |
---|
| 437 | + &rq_phys_addr, GFP_KERNEL); |
---|
439 | 438 | if (!rq_addr) |
---|
440 | 439 | return -ENOMEM; |
---|
441 | 440 | |
---|
442 | 441 | rsp_size = SIZEOF_CARDRSP_TX(struct qlcnic_cardrsp_tx_ctx); |
---|
443 | | - rsp_addr = dma_zalloc_coherent(&adapter->pdev->dev, rsp_size, |
---|
444 | | - &rsp_phys_addr, GFP_KERNEL); |
---|
| 442 | + rsp_addr = dma_alloc_coherent(&adapter->pdev->dev, rsp_size, |
---|
| 443 | + &rsp_phys_addr, GFP_KERNEL); |
---|
445 | 444 | if (!rsp_addr) { |
---|
446 | 445 | err = -ENOMEM; |
---|
447 | 446 | goto out_free_rq; |
---|
.. | .. |
---|
855 | 854 | struct qlcnic_cmd_args cmd; |
---|
856 | 855 | size_t nic_size = sizeof(struct qlcnic_info_le); |
---|
857 | 856 | |
---|
858 | | - nic_info_addr = dma_zalloc_coherent(&adapter->pdev->dev, nic_size, |
---|
859 | | - &nic_dma_t, GFP_KERNEL); |
---|
| 857 | + nic_info_addr = dma_alloc_coherent(&adapter->pdev->dev, nic_size, |
---|
| 858 | + &nic_dma_t, GFP_KERNEL); |
---|
860 | 859 | if (!nic_info_addr) |
---|
861 | 860 | return -ENOMEM; |
---|
862 | 861 | |
---|
.. | .. |
---|
909 | 908 | if (adapter->ahw->op_mode != QLCNIC_MGMT_FUNC) |
---|
910 | 909 | return err; |
---|
911 | 910 | |
---|
912 | | - nic_info_addr = dma_zalloc_coherent(&adapter->pdev->dev, nic_size, |
---|
913 | | - &nic_dma_t, GFP_KERNEL); |
---|
| 911 | + nic_info_addr = dma_alloc_coherent(&adapter->pdev->dev, nic_size, |
---|
| 912 | + &nic_dma_t, GFP_KERNEL); |
---|
914 | 913 | if (!nic_info_addr) |
---|
915 | 914 | return -ENOMEM; |
---|
916 | 915 | |
---|
.. | .. |
---|
964 | 963 | void *pci_info_addr; |
---|
965 | 964 | int err = 0, i; |
---|
966 | 965 | |
---|
967 | | - pci_info_addr = dma_zalloc_coherent(&adapter->pdev->dev, pci_size, |
---|
968 | | - &pci_info_dma_t, GFP_KERNEL); |
---|
| 966 | + pci_info_addr = dma_alloc_coherent(&adapter->pdev->dev, pci_size, |
---|
| 967 | + &pci_info_dma_t, GFP_KERNEL); |
---|
969 | 968 | if (!pci_info_addr) |
---|
970 | 969 | return -ENOMEM; |
---|
971 | 970 | |
---|
.. | .. |
---|
1078 | 1077 | return -EIO; |
---|
1079 | 1078 | } |
---|
1080 | 1079 | |
---|
1081 | | - stats_addr = dma_zalloc_coherent(&adapter->pdev->dev, stats_size, |
---|
1082 | | - &stats_dma_t, GFP_KERNEL); |
---|
| 1080 | + stats_addr = dma_alloc_coherent(&adapter->pdev->dev, stats_size, |
---|
| 1081 | + &stats_dma_t, GFP_KERNEL); |
---|
1083 | 1082 | if (!stats_addr) |
---|
1084 | 1083 | return -ENOMEM; |
---|
1085 | 1084 | |
---|
.. | .. |
---|
1134 | 1133 | if (mac_stats == NULL) |
---|
1135 | 1134 | return -ENOMEM; |
---|
1136 | 1135 | |
---|
1137 | | - stats_addr = dma_zalloc_coherent(&adapter->pdev->dev, stats_size, |
---|
1138 | | - &stats_dma_t, GFP_KERNEL); |
---|
| 1136 | + stats_addr = dma_alloc_coherent(&adapter->pdev->dev, stats_size, |
---|
| 1137 | + &stats_dma_t, GFP_KERNEL); |
---|
1139 | 1138 | if (!stats_addr) |
---|
1140 | 1139 | return -ENOMEM; |
---|
1141 | 1140 | |
---|