[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878ryvz9w3.fsf@linux.ibm.com>
Date: Thu, 14 Oct 2021 14:25:32 -0500
From: Nathan Lynch <nathanl@...ux.ibm.com>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: Tyrel Datwyler <tyreld@...ux.ibm.com>, linux-scsi@...r.kernel.org,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2] scsi: ibmvscsi: Use dma_alloc_noncoherent() instead
of get_zeroed_page/dma_map_single()
Cai Huoqing <caihuoqing@...du.com> writes:
> @@ -331,18 +329,12 @@ static int ibmvscsi_init_crq_queue(struct crq_queue *queue,
> int retrc;
> struct vio_dev *vdev = to_vio_dev(hostdata->dev);
>
> - queue->msgs = (struct viosrp_crq *)get_zeroed_page(GFP_KERNEL);
> -
> - if (!queue->msgs)
> - goto malloc_failed;
> queue->size = PAGE_SIZE / sizeof(*queue->msgs);
> -
> - queue->msg_token = dma_map_single(hostdata->dev, queue->msgs,
> - queue->size * sizeof(*queue->msgs),
> - DMA_BIDIRECTIONAL);
> -
> - if (dma_mapping_error(hostdata->dev, queue->msg_token))
> - goto map_failed;
> + queue->msgs = dma_alloc_noncoherent(hostdata->dev,
> + PAGE_SIZE, &queue->msg_token,
> + DMA_BIDIRECTIONAL, GFP_KERNEL);
> + if (!queue->msg)
> + goto malloc_failed;
This version appears to retain the build breakage from v1 which was
reported here:
https://lore.kernel.org/linuxppc-dev/202110121452.nWPHZeZg-lkp@intel.com/
drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_init_crq_queue':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:334:21: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
334 | if (!queue->msg)
| ^~~
| msgs
drivers/scsi/ibmvscsi/ibmvscsi.c:388:60: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
388 | dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
| ^~~
| msgs
Powered by blists - more mailing lists