linux/drivers/net/ethernet/intel
Russell King 53567aa4e0 DMA-API: net: intel/ixgbevf: fix 32-bit DMA mask handling
The fallback to 32-bit DMA mask is rather odd:
	if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
	    !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
		pci_using_dac = 1;
	} else {
		err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (err) {
			err = dma_set_coherent_mask(&pdev->dev,
						    DMA_BIT_MASK(32));
			if (err) {
				dev_err(&pdev->dev, "No usable DMA "
					"configuration, aborting\n");
				goto err_dma;
			}
		}
		pci_using_dac = 0;
	}
This means we only set the coherent DMA mask in the fallback path if
the DMA mask set failed, which is silly.  This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.

Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-09-21 21:01:40 +01:00
..
e1000 drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent 2013-08-29 21:55:23 -04:00
e1000e DMA-API: net: intel/e1000e: fix 32-bit DMA mask handling 2013-09-21 21:00:39 +01:00
i40e i40e: include i40e in kernel proper 2013-09-11 02:28:40 -07:00
igb DMA-API: net: intel/igb: fix 32-bit DMA mask handling 2013-09-21 21:00:59 +01:00
igbvf DMA-API: net: intel/igbvf: fix 32-bit DMA mask handling 2013-09-21 21:01:14 +01:00
ixgb DMA-API: net: intel/ixgb: fix 32-bit DMA mask handling 2013-09-21 21:01:25 +01:00
ixgbe DMA-API: net: intel/ixgbe: fix 32-bit DMA mask handling 2013-09-21 21:01:36 +01:00
ixgbevf DMA-API: net: intel/ixgbevf: fix 32-bit DMA mask handling 2013-09-21 21:01:40 +01:00
e100.c e100: dump small buffers via %*ph 2013-07-28 02:06:38 -07:00
Kconfig i40e: include i40e in kernel proper 2013-09-11 02:28:40 -07:00
Makefile i40e: include i40e in kernel proper 2013-09-11 02:28:40 -07:00