[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdK4IIFvi5O5eXHC@infradead.org>
Date: Mon, 3 Jan 2022 00:47:28 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
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()
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.
Powered by blists - more mailing lists