RE: [PATCH 20/28] qedi: fully convert to the generic DMA API

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

 



> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx <linux-scsi-owner@xxxxxxxxxxxxxxx> On
> Behalf Of Christoph Hellwig
> Sent: Sunday, October 14, 2018 9:30 PM
> To: linux-scsi@xxxxxxxxxxxxxxx
> Subject: [PATCH 20/28] qedi: fully convert to the generic DMA API
> 
> 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/qedi/qedi_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index
> aa96bccb5a96..95d3fce994f6 100644
> --- a/drivers/scsi/qedi/qedi_main.c
> +++ b/drivers/scsi/qedi/qedi_main.c
> @@ -806,11 +806,11 @@ static int qedi_set_iscsi_pf_param(struct qedi_ctx
> *qedi)
>         memset(&qedi->pf_params.iscsi_pf_params, 0,
>                sizeof(qedi->pf_params.iscsi_pf_params));
> 
> -       qedi->p_cpuq = pci_alloc_consistent(qedi->pdev,
> +       qedi->p_cpuq = dma_alloc_coherent(&qedi->pdev->dev,
>                         qedi->num_queues * sizeof(struct qedi_glbl_q_params),
> -                       &qedi->hw_p_cpuq);
> +                       &qedi->hw_p_cpuq, GFP_KERNEL);
>         if (!qedi->p_cpuq) {
> -               QEDI_ERR(&qedi->dbg_ctx, "pci_alloc_consistent fail\n");
> +               QEDI_ERR(&qedi->dbg_ctx, "pci_alloc_coherent fail\n");

Trivial change, please update the QEDI_ERR message with correct function name.

>                 rval = -1;
>                 goto err_alloc_mem;
>         }
> @@ -871,7 +871,7 @@ static void qedi_free_iscsi_pf_param(struct qedi_ctx
> *qedi)
> 
>         if (qedi->p_cpuq) {
>                 size = qedi->num_queues * sizeof(struct qedi_glbl_q_params);
> -               pci_free_consistent(qedi->pdev, size, qedi->p_cpuq,
> +               dma_free_coherent(&qedi->pdev->dev, size, qedi->p_cpuq,
>                                     qedi->hw_p_cpuq);
>         }
> 
> --
> 2.19.1

Rest of the patch looks good to me.

Acked-by: Manish Rangankar <Manish.Rangankar@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