]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:03:03 +0000 (22:03 -0800)
commitb9feb1487cb779958554d066a69b77a2707751e0
treef0a50b3519799853c00916518f6cf6525aff5849
parent994cb52c0b9eb7cdae6eeb79aaa164b6a7efa11c
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>
Orabug: 25394529
(cherry picked from commit c04ae58e2b6d836325914e7b4aa25f43da1be3df)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c