linux_dsm_epyc7002/drivers/net/ethernet/intel
Russell King 590990362b DMA-API: net: intel/ixgb: 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) {
				pr_err("No usable DMA configuration, aborting\n");
				goto err_dma_mask;
			}
		}
	}
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:25 +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 ixgbe: add support for older QSFP active DA cables 2013-08-29 03:36:55 -07:00
ixgbevf drivers/net: Convert uses of compare_ether_addr to ether_addr_equal 2013-09-03 22:28:04 -04: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