lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b171c3c0-d924-e2e6-0c4d-196c7e6c2325@samsung.com>
Date:   Mon, 13 Jan 2020 12:31:56 +0100
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Peter Ujfalusi <peter.ujfalusi@...com>
Cc:     Viresh Kumar <viresh.kumar@...aro.org>, vireshk@...nel.org,
        axboe@...nel.dk, vkoul@...nel.org, linux-ide@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ata: pata_arasam_cf: Use dma_request_chan() instead
 dma_request_slave_channel()


On 12/17/19 12:19 PM, Viresh Kumar wrote:
> On 17-12-19, 12:50, Peter Ujfalusi wrote:
>> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
>> eating up the error code.
>>
>> By using dma_request_chan() directly the driver can support deferred
>> probing against DMA.

It doesn't seem to be the case as DMA channel is requested at the start
of the data transfer (which happens after the driver has been successfully
probed).

PS there is a typo in the patch summary (it should "pata_arasan_cf").

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
>> ---
>>  drivers/ata/pata_arasan_cf.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
>> index 135173c8d138..69b555d83f68 100644
>> --- a/drivers/ata/pata_arasan_cf.c
>> +++ b/drivers/ata/pata_arasan_cf.c
>> @@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work)
>>  
>>  	/* request dma channels */
>>  	/* dma_request_channel may sleep, so calling from process context */
>> -	acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data");
>> -	if (!acdev->dma_chan) {
>> +	acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
>> +	if (IS_ERR(acdev->dma_chan)) {
>>  		dev_err(acdev->host->dev, "Unable to get dma_chan\n");
>> +		acdev->dma_chan = NULL;
>>  		goto chan_request_fail;
>>  	}
>>  
>> @@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work)
>>  	}
>>  
>>  	dma_release_channel(acdev->dma_chan);
>> +	acdev->dma_chan = NULL;
>>  
>>  	/* data xferred successfully */
>>  	if (!ret) {
> 
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ