[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1389190832.2728.60.camel@deadeye.wl.decadent.org.uk>
Date: Wed, 8 Jan 2014 14:20:32 +0000
From: Ben Hutchings <bhutchings@...arflare.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC: <davem@...emloft.net>, Greg Rose <gregory.v.rose@...el.com>,
<netdev@...r.kernel.org>, <gospo@...hat.com>,
<sassmann@...hat.com>,
"Mitch Williams" <mitch.a.williams@...el.com>
Subject: Re: [net-next 1/8] i40evf: main driver core
On Tue, 2013-12-31 at 16:53 -0800, Jeff Kirsher wrote:
[...]
> +static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> +{
> + struct net_device *netdev;
> + struct i40evf_adapter *adapter = NULL;
> + struct i40e_hw *hw = NULL;
> + int err, pci_using_dac;
> +
> + err = pci_enable_device(pdev);
> + if (err)
> + return err;
> +
> + if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
> + pci_using_dac = true;
> + /* coherent mask for the same size will always succeed if
> + * dma_set_mask does
> + */
> + dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
> + } else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
> + pci_using_dac = false;
> + dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> + } else {
> + dev_err(&pdev->dev, "%s: DMA configuration failed: %d\n",
> + __func__, err);
> + err = -EIO;
> + goto err_dma;
> + }
[...]
Should use dma_set_mask_and_coherent().
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists