Re: [PATCH 19/28] qedf: fully convert to the generic DMA API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, 14 Oct 2018, 11:59am, Christoph Hellwig wrote:

> External Email
> 
> The driver is currently using an odd mix of legacy PCI DMA API and
> generic DMA API calls, switch it over to the generic API entirely.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
> ---
>  drivers/scsi/qedf/qedf_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> index 0a5dd5595dd3..d5a4f17fce51 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -2855,12 +2855,12 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf)
>         QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n",
>                    qedf->num_queues);
> 
> -       qedf->p_cpuq = pci_alloc_consistent(qedf->pdev,
> +       qedf->p_cpuq = dma_alloc_coherent(&qedf->pdev->dev,
>             qedf->num_queues * sizeof(struct qedf_glbl_q_params),
> -           &qedf->hw_p_cpuq);
> +           &qedf->hw_p_cpuq, GFP_KERNEL);
> 
>         if (!qedf->p_cpuq) {
> -               QEDF_ERR(&(qedf->dbg_ctx), "pci_alloc_consistent failed.\n");
> +               QEDF_ERR(&(qedf->dbg_ctx), "dma_alloc_coherent failed.\n");
>                 return 1;
>         }
> 
> @@ -2929,7 +2929,7 @@ static void qedf_free_fcoe_pf_param(struct qedf_ctx *qedf)
> 
>         if (qedf->p_cpuq) {
>                 size = qedf->num_queues * sizeof(struct qedf_glbl_q_params);
> -               pci_free_consistent(qedf->pdev, size, qedf->p_cpuq,
> +               dma_free_coherent(&qedf->pdev->dev, size, qedf->p_cpuq,
>                     qedf->hw_p_cpuq);
>         }
> 
> --
> 2.19.1
> 
> 

Looks ok.

Acked-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux