linux/drivers/net/ethernet/intel/igb
Russell King dc4ff9bb75 DMA-API: net: intel/igb: 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:00:59 +01:00
..
e1000_82575.c igb: Get speed and duplex for 1G non_copper devices 2013-09-04 05:28:31 -07:00
e1000_82575.h igb: Add support for i354 devices 2013-04-18 16:40:35 -07:00
e1000_defines.h igb: New PHY_ID for i354 device 2013-09-04 04:57:13 -07:00
e1000_hw.h igb: Add device support for flashless SKU of i210 device 2013-08-22 02:26:06 -07:00
e1000_i210.c igb: Refactor NVM read functions to accommodate devices with no flash 2013-08-22 02:26:00 -07:00
e1000_i210.h igb: Refactor NVM read functions to accommodate devices with no flash 2013-08-22 02:26:00 -07:00
e1000_mac.c igb: Support to get 2_5G link status for appropriate media type 2013-09-04 05:19:30 -07:00
e1000_mac.h igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
e1000_mbx.c igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
e1000_mbx.h igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
e1000_nvm.c igb: Fix get_fw_version function for all parts 2013-08-22 02:26:09 -07:00
e1000_nvm.h igb: Fix get_fw_version function for all parts 2013-08-22 02:26:09 -07:00
e1000_phy.c igb: M88E1543 PHY downshift implementation 2013-09-04 05:04:31 -07:00
e1000_phy.h igb: Support for SFP modules discovery 2013-05-21 02:37:36 -07:00
e1000_regs.h igb: Add support for i354 devices 2013-04-18 16:40:35 -07:00
igb_ethtool.c igb: Implementation to report advertised/supported link on i354 devices 2013-09-04 05:41:05 -07:00
igb_hwmon.c igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
igb_main.c DMA-API: net: intel/igb: fix 32-bit DMA mask handling 2013-09-21 21:00:59 +01:00
igb_ptp.c igb: Read register for latch_on without return value 2013-08-22 02:25:25 -07:00
igb.h igb: Implementation of 1-sec delay for i210 devices 2013-09-04 03:53:53 -07:00
Makefile igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00