]> asedeno.scripts.mit.edu Git - linux.git/commit
fm10k: use dma_set_mask_and_coherent in fm10k_probe
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 16 Jun 2015 20:41:43 +0000 (13:41 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Jun 2015 21:21:10 +0000 (14:21 -0700)
commitc04ae58e2b6d836325914e7b4aa25f43da1be3df
tree7aefc77b7aa07da52ebea0f6a0e6dda6a58463e3
parent0197cde62a0a39fdee606557b8cef6573a83e866
fm10k: use dma_set_mask_and_coherent in fm10k_probe

This patch cleans up the use of dma_get_required_mask and uses the
simpler dma_set_mask_and_coherent function instead of doing these as
separate steps.

I removed the dma_get_required_mask call because based on some minimal
testing it appears that either (a) we're not doing the right thing with
the call or (b) we don't need it anyways. If the value returned is
<48bits, we'll end up trying with 48 bits anyways. If it's over 48bits,
fm10k can't support that anyways, and we should try 48bits. If 48bits
fails, we'll fallback to 32bits. This cleans up some very funky code.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c