linux/drivers/net/ethernet/intel/ixgbevf
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
..
defines.h ixgbevf: Add VF DCB + SR-IOV support 2012-10-22 21:15:35 -07:00
ethtool.c ixgbevf: Make sure link status and speed are fetched 2013-01-28 00:19:52 -08:00
ixgbevf_main.c DMA-API: net: intel/ixgbevf: fix 32-bit DMA mask handling 2013-09-21 21:01:40 +01:00
ixgbevf.h ixgbevf: Make next_to_watch a pointer and adjust memory barriers to avoid races 2013-03-08 00:03:26 -08:00
Makefile ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
mbx.c ixgbevf: Fix code for handling timeout 2012-09-24 00:21:51 -07:00
mbx.h ixgbevf: Add VF DCB + SR-IOV support 2012-10-22 21:15:35 -07:00
regs.h ixgbevf: Update copyright notices 2012-02-03 03:07:09 -08:00
vf.c ixgbevf: Adjust to handle unassigned MAC address from PF 2013-03-28 01:13:46 -07:00
vf.h ixgbevf: Add VF DCB + SR-IOV support 2012-10-22 21:15:35 -07:00