linux_dsm_epyc7002/drivers/net/ethernet/intel/igbvf
Russell King c21b8ebc2f DMA-API: net: intel/igbvf: fix 32-bit DMA mask handling
The fallback to 32-bit DMA mask is rather odd:
	err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
	if (!err) {
		err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
		if (!err)
			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;
			}
		}
	}
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:14 +01:00
..
defines.h igbvf: work around i350 erratum 2012-11-28 03:57:23 -08:00
ethtool.c igbvf: fix divide by zero 2012-06-30 17:40:45 -07:00
igbvf.h igbvf: Make next_to_watch a pointer and adjust memory barriers to avoid races 2013-02-15 21:46:51 -08:00
Makefile igbvf: change copyright date 2012-02-03 03:07:15 -08:00
mbx.c igbvf: change copyright date 2012-02-03 03:07:15 -08:00
mbx.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00
netdev.c DMA-API: net: intel/igbvf: fix 32-bit DMA mask handling 2013-09-21 21:01:14 +01:00
regs.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00
vf.c drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
vf.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00