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] [day] [month] [year] [list]
Date:   Wed, 5 Jan 2022 20:51:42 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     benve@...co.com, govind@....com, davem@...emloft.net,
        kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] enic: Use dma_set_mask_and_coherent()

Le 03/01/2022 à 09:47, Christoph Hellwig a écrit :
> On Sat, Jan 01, 2022 at 03:02:45PM +0100, Christophe JAILLET wrote:
>> -	err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(47));
>> +	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(47));
>>   	if (err) {
>> +		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>>   		if (err) {
>>   			dev_err(dev, "No usable DMA configuration, aborting\n");
>>   			goto err_out_release_regions;
>>   		}
>>   	} else {
>>   		using_dac = 1;
> 
> There is no need for the callback.  All the routines to set a DMA mask
> will only fail if the passed in mask is too small, but never if it is
> larger than what is supported.  Also the using_dac variable is not
> needed, NETIF_F_HIGHDMA can and should be set unconditionally.
> 

Ok, thanks.
I was only aware of the 64 bits case.
The patch has already reached -next.

I'll send another patch on to of it to go one step further.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ